函数逻辑报告 |
Source Code:security\tomoyo\memory.c |
Create Date:2022-07-27 21:12:48 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| 首页 | 函数Tree |
| 注解内核,赢得工具 | 下载SCCT | English |
函数名称:moyo_get_group - Allocate memory for "struct tomoyo_path_group"/"struct tomoyo_number_group".*@param: Pointer to "struct tomoyo_acl_param".*@idx: Index number.* Returns pointer to "struct tomoyo_group" on success, NULL otherwise.
函数原型:struct tomoyo_group *tomoyo_get_group(struct tomoyo_acl_param *param, const u8 idx)
返回类型:struct tomoyo_group
参数:
| 类型 | 参数 | 名称 |
|---|---|---|
| struct tomoyo_acl_param * | param | |
| const u8 | idx |
| 98 | struct tomoyo_group e = {} |
| 99 | struct tomoyo_group * group = NULL |
| 101 | group_name等于tomoyo_read_token(param) |
| 102 | bool found = false |
| 104 | 如果非tomoyo_correct_word(group_name)或idx大于等于TOMOYO_MAX_GROUP则返回:NULL |
| 107 | 如果非group_name则返回:NULL |
| 109 | 如果mutex_lock_interruptible( & tomoyo_policy_lock)则转到:out |
| 111 | list等于 List of "struct tomoyo_group". [idx] |
| 113 | 如果group_name不等于group_name或atomic_read( & users)恒等于Garbage collector is trying to kfree() this element. 则继续下一循环 |
| 116 | atomic_inc( & users) |
| 117 | found = true |
| 118 | 退出 |
| 120 | 如果非found则 |
| 123 | 如果entry则 |
| 132 | out : |
| 名称 | 描述 |
|---|---|
| tomoyo_write_inet_network | moyo_write_inet_network - Write "struct tomoyo_inet_acl" list.*@param: Pointer to "struct tomoyo_acl_param".* Returns 0 on success, negative value otherwise.* Caller holds tomoyo_read_lock(). |
| tomoyo_parse_name_union | moyo_parse_name_union - Parse a tomoyo_name_union.*@param: Pointer to "struct tomoyo_acl_param".*@ptr: Pointer to "struct tomoyo_name_union".* Returns true on success, false otherwise. |
| tomoyo_parse_number_union | moyo_parse_number_union - Parse a tomoyo_number_union.*@param: Pointer to "struct tomoyo_acl_param".*@ptr: Pointer to "struct tomoyo_number_union".* Returns true on success, false otherwise. |
| tomoyo_write_group | moyo_write_group - Write "struct tomoyo_path_group"/"struct tomoyo_number_group"/"struct tomoyo_address_group" list.*@param: Pointer to "struct tomoyo_acl_param".*@type: Type of this group.* Returns 0 on success, negative value otherwise. |
| 源代码转换工具 开放的插件接口 | X |
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |