Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:smack_getprocattr - Smack process attribute access*@p: the object task*@name: the name of the attribute in /proc/.../attr*@value: where to put the result* Places a copy of the task Smack into value* Returns the length of the smack label or an error code

Proto:static int smack_getprocattr(struct task_struct *p, char *name, char **value)

Type:int

Parameter:

TypeParameterName
struct task_struct *p
char *name
char **value
3490  skp = smk_of_task_struct(p)
3494  If strcmp(name, "current") != 0 Then Return -EINVAL
3497  cp = kstrdup - allocate space for and copy an existing string*@s: the string to duplicate*@gfp: the GFP mask used in the kmalloc() call when allocating memory* Return: newly allocated copy of @s or %NULL in case of error
3498  If (cp == NULL) Then Return -ENOMEM
3501  slen = strlen - Find the length of a string*@s: The string to be sized
3502  value = cp
3503  Return slen