函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

函数原型:static ssize_t smk_write_ptrace(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
2791  如果非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
2794  如果ppos不等于0或count大于等于temp的长度或count恒等于0则返回:负EINVAL
2797  如果copy_from_user(temp, buf, count)不等于0则返回:负EFAULT
2800  temp[count]等于'\0'
2802  如果sscanf - Unformat a buffer into a list of arguments*@buf: input buffer*@fmt: formatting of buffer*@...: resulting arguments不等于1则返回:负EINVAL
2804  如果i小于Ptrace rulesi大于SMACK_PTRACE_MAX则返回:负EINVAL
2806  Ptrace current rule* SMACK_PTRACE_DEFAULT regular smack ptrace rules (/proc based)* SMACK_PTRACE_EXACT labels must match, but can be overriden with* CAP_SYS_PTRACE* SMACK_PTRACE_DRACONIAN lables must match, CAP_SYS_PTRACE has no effect等于i
2808  返回:count