函数逻辑报告 |
Source Code:security\apparmor\match.c |
Create Date:2022-07-27 21:28:29 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称: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)
函数原型:static struct table_header *unpack_table(char *blob, size_t bsize)
返回类型:struct table_header
参数:
类型 | 参数 | 名称 |
---|---|---|
char * | blob | |
size_t | bsize |
79 | struct table_header * table = NULL |
83 | 如果bsize小于sizeof(structtable_header)则转到:out |
89 | td_id等于be16_to_cpu( * (__be16 * )(blob))减1 |
90 | 如果td_id大于YYTD_ID_MAX则转到: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 | 如果非td_flags恒等于YYTD_DATA16或td_flags恒等于YYTD_DATA32或td_flags恒等于YYTD_DATA8的值则转到:out |
100 | tsize等于table_size(td_lolen, td_flags) |
104 | table等于kvzalloc(tsize, GFP_KERNEL) |
105 | 如果table则 |
109 | 如果td_flags恒等于YYTD_DATA8则UNPACK_ARRAY(td_data, blob, td_lolen, u8, u8, byte_to_byte) |
112 | 否则如果td_flags恒等于YYTD_DATA16则UNPACK_ARRAY(td_data, blob, td_lolen, u16, __be16, be16_to_cpu) |
115 | 否则如果td_flags恒等于YYTD_DATA32则UNPACK_ARRAY(td_data, blob, td_lolen, u32, __be32, be32_to_cpu) |
118 | 否则转到:fail |
127 | out : |
128 | 返回:table |
129 | fail : |
131 | 返回:NULL |
名称 | 描述 |
---|---|
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 |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |