Function report |
Source Code:security\apparmor\match.c |
Create Date:2022-07-28 19:51:04 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:pack_table - unpack a dfa table (one of accept, default, base, next check)*@blob: data to unpack (NOT NULL)*@bsize: size of blob* Returns: pointer to table else NULL on failure* NOTE: must be freed by kvfree (not kfree)
Proto:static struct table_header *unpack_table(char *blob, size_t bsize)
Type:struct table_header
Parameter:
Type | Parameter | Name |
---|---|---|
char * | blob | |
size_t | bsize |
79 | struct table_header * table = NULL |
83 | If bsize < sizeof(structtable_header) Then Go to out |
89 | td_id = be16_to_cpu( * (__be16 * )(blob)) - 1 |
90 | If td_id > YYTD_ID_MAX Then Go to out |
92 | td_flags = be16_to_cpu( * (__be16 * )(blob + 2)) |
93 | td_lolen = be32_to_cpu( * (__be32 * )(blob + 8)) |
94 | blob += sizeof(structtable_header) |
96 | If Not ( td_flags == YYTD_DATA16 || td_flags == YYTD_DATA32 || td_flags == YYTD_DATA8 ) Then Go to out |
100 | tsize = table_size(td_lolen, td_flags) |
104 | table = kvzalloc(tsize, GFP_KERNEL) |
105 | If table Then |
109 | If td_flags == YYTD_DATA8 Then UNPACK_ARRAY(td_data, blob, td_lolen, u8, u8, byte_to_byte) |
112 | Else if td_flags == YYTD_DATA16 Then UNPACK_ARRAY(td_data, blob, td_lolen, u16, __be16, be16_to_cpu) |
115 | Else if td_flags == YYTD_DATA32 Then UNPACK_ARRAY(td_data, blob, td_lolen, u32, __be32, be32_to_cpu) |
118 | Else Go to fail |
127 | out : |
128 | Return table |
129 | fail : |
131 | Return NULL |
Name | Describe |
---|---|
aa_dfa_unpack | aa_dfa_unpack - unpack the binary tables of a serialized dfa*@blob: aligned serialized stream of data to unpack (NOT NULL)*@size: size of data to unpack*@flags: flags controlling what type of accept tables are acceptable |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |