函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:smk_write_onlycap - write() for smackfs/onlycap*@file: file pointer, not actually used*@buf: where to get the data from*@count: bytes sent*@ppos: where to start* Returns number of bytes written or error code, as appropriate

函数原型:static ssize_t smk_write_onlycap(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
1984  LIST_HEAD(list_tmp)
1987  如果非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
1990  data等于memdup_user_nul - duplicate memory region from user space and NUL-terminate*@src: source address in user space*@len: number of bytes to copy* Return: an ERR_PTR() on failure.
1991  如果是错误则返回:错误
1994  rc等于smk_parse_label_list - parse list of Smack labels, separated by spaces*@data: the string to parse*@private: destination list* Returns zero on success or error code, as appropriate
1995  释放内存
2007  如果非rcrc恒等于负EINVAL链表为空
2008  mutex_lock( & smack_onlycap_lock)
2009  smk_list_swap_rcu - swap public list with a private one in RCU-safe way* The caller must hold appropriate mutex to prevent concurrent modifications* to the public list
2010  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.
2011  rc等于count
2014  smk_destroy_label_list - destroy a list of smack_known_list_elem*@head: header pointer of the list to destroy
2016  返回:rc