Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\tomoyo\domain.c Create Date:2022-07-28 19:39:26
Last Modify:2022-05-23 20:14:46 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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.

Proto: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 *))

Type:int

Parameter:

TypeParameterName
struct tomoyo_acl_head *new_entry
const intsize
struct tomoyo_acl_param *param
bool (*check_duplicate
38  error = If is_delete Then -ENOENT Else -ENOMEM
40  list = list
42  If mutex_lock_interruptible( & tomoyo_policy_lock) Then Return -ENOMEM
46  If rue or false or TOMOYO_GC_IN_PROGRESS == Garbage collector is trying to kfree() this element. Then Continue
48  If Not check_duplicate(entry, new_entry) Then Continue
50  rue or false or TOMOYO_GC_IN_PROGRESS = is_delete
51  error = 0
52  Break
54  If error && Not is_delete Then
55  entry = tomoyo_commit_ok(new_entry, size)
56  If entry Then
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  Return error
Caller
NameDescribe
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.