函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:smk_write_revoke_subj - write() for /smack/revoke-subject*@file: file pointer*@buf: data from user space*@count: bytes sent*@ppos: where to start - must be 0

函数原型:static ssize_t smk_write_revoke_subj(struct file *file, const char __user *buf, size_t count, loff_t *ppos)

返回类型:ssize_t

参数:

类型参数名称
struct file *file
const char __user *buf
size_tcount
loff_t *ppos
2494  rc等于count
2496  如果ppos不等于0则返回:负EINVAL
2499  如果非smack_privileged - are all privilege requirements met*@cap: The requested capability* Is the task privileged and allowed to be privileged* by the onlycap rule.* Returns true if the task is allowed to be privileged, false if it's not.则返回:负EPERM
2502  如果count恒等于0或count大于SMK_LONGLABEL则返回:负EINVAL
2505  data等于memdup_user - duplicate memory region from user space*@src: source address in user space*@len: number of bytes to copy* Return: an ERR_PTR() on failure. Result is physically* contiguous, to be freed by kfree().
2506  如果是错误则返回:错误
2509  cp等于smk_parse_smack - parse smack label from a text string*@string: a text string that might contain a Smack label*@len: the maximum size, or zero if it is NULL terminated.* Returns a pointer to the clean label or an error code.
2510  如果是错误
2511  rc等于错误
2512  转到:out_data
2515  skp等于smk_find_entry - find a label on the list, return the list entry*@string: a text string that might be a Smack label* Returns a pointer to the entry in the label list that* matches the passed string or NULL if not found.
2516  如果(skp == NULL)则转到:out_cp
2519  rule_list等于access rules
2520  rule_lock等于lock for rules
2522  mutex_lock(rule_lock)
2524  遍历RCU(sp, rule_list, list)
2525  smk_access等于0
2527  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.
2529  out_cp :
2530  释放内存
2531  out_data :
2532  释放内存
2534  返回:rc