函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\tomoyo\domain.c Create Date:2022-07-27 21:08:30
Last Modify:2022-05-23 20:14:46 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:moyo_update_policy - Update an entry for exception policy.*@new_entry: Pointer to "struct tomoyo_acl_info".*@size: Size of @new_entry in bytes.*@param: Pointer to "struct tomoyo_acl_param".*@check_duplicate: Callback function to find duplicated entry.

函数原型:int tomoyo_update_policy(struct tomoyo_acl_head *new_entry, const int size, struct tomoyo_acl_param *param, bool (*check_duplicate)(const struct tomoyo_acl_head *, const struct tomoyo_acl_head *))

返回类型:int

参数:

类型参数名称
struct tomoyo_acl_head *new_entry
const intsize
struct tomoyo_acl_param *param
bool (*check_duplicate
38  error等于如果is_delete则负ENOENT否则负ENOMEM
40  list等于list
42  如果mutex_lock_interruptible( & tomoyo_policy_lock)则返回:负ENOMEM
46  如果rue or false or TOMOYO_GC_IN_PROGRESS 恒等于Garbage collector is trying to kfree() this element. 则继续下一循环
48  如果非check_duplicate(entry, new_entry)则继续下一循环
50  rue or false or TOMOYO_GC_IN_PROGRESS 等于is_delete
51  error等于0
52  退出
54  如果error且非is_delete
55  entry等于tomoyo_commit_ok(new_entry, size)
56  如果entry
58  error等于0
61  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
62  返回:error
调用者
名称描述
tomoyo_write_transition_controlmoyo_write_transition_control - Write "struct tomoyo_transition_control" list.*@param: Pointer to "struct tomoyo_acl_param".*@type: Type of this entry.* Returns 0 on success, negative value otherwise.
tomoyo_write_aggregatormoyo_write_aggregator - Write "struct tomoyo_aggregator" list.*@param: Pointer to "struct tomoyo_acl_param".* Returns 0 on success, negative value otherwise.* Caller holds tomoyo_read_lock().
tomoyo_write_groupmoyo_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.