Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\smack\smackfs.c Create Date:2022-07-28 19:29:24
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:smk_write_relabel_self - write() for /smack/relabel-self*@file: file pointer, not actually used*@buf: where to get the data from*@count: bytes sent*@ppos: where to start - must be 0

Proto:static ssize_t smk_write_relabel_self(struct file *file, const char __user *buf, size_t count, loff_t *ppos)

Type:ssize_t

Parameter:

TypeParameterName
struct file *file
const char __user *buf
size_tcount
loff_t *ppos
2713  tsp = smack_cred(current_cred - Access the current task's subjective credentials* Access the subjective credentials of the current task. RCU-safe,* since nobody else can modify it.())
2716  LIST_HEAD(list_tmp)
2721  If Not 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. Then Return -EPERM
2727  If ppos != 0 Then Return -EINVAL
2730  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.
2731  If IS_ERR(data) Then Return PTR_ERR(data)
2734  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
2735  kfree(data)
2737  If Not rc || rc == -EINVAL && list_empty - tests whether a list is empty*@head: the list to test. Then
2738  smk_destroy_label_list - destroy a list of smack_known_list_elem*@head: header pointer of the list to destroy
2739  list_splice - join two lists, this is designed for stacks*@list: the new list to add.*@head: the place to add it in the first list.
2740  Return count
2743  smk_destroy_label_list - destroy a list of smack_known_list_elem*@head: header pointer of the list to destroy
2744  Return rc