函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\smack\smackfs.c Create Date:2022-07-27 20:55:45
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:smk_set_access - add a rule to the rule list or replace an old rule*@srp: the rule to add or replace*@rule_list: the list of rules*@rule_lock: the rule list lock* Looks through the current subject/object/access list for* the subject/object pair and

函数原型:static int smk_set_access(struct smack_parsed_rule *srp, struct list_head *rule_list, struct mutex *rule_lock)

返回类型:int

参数:

类型参数名称
struct smack_parsed_rule *srp
struct list_head *rule_list
struct mutex *rule_lock
216  found等于0
217  rc等于0
219  mutex_lock(rule_lock)
226  如果smk_object恒等于smk_objectsmk_subject恒等于smk_subject
228  found等于1
229  smk_access或等于smk_access1
230  smk_access与等于smk_access2的反
231  退出
235  如果found恒等于0则
236  sp等于Shortcuts
237  如果(sp == NULL)则
238  rc等于负ENOMEM
239  转到:out
242  smk_subject等于smk_subject
243  smk_object等于smk_object
244  smk_access等于smk_access1按位与smk_access2的反
246  添加RCU保护项
249  out :
250  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.
251  返回:rc
调用者
名称描述
smk_write_rules_listsmk_write_rules_list - write() for any /smack rule file*@file: file pointer, not actually used*@buf: where to get the data from*@count: bytes sent*@ppos: where to start - must be 0*@rule_list: the list of rules to write to*@rule_lock: lock for the rule