函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:smk_write_logging - write() for /smack/logging*@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_logging(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
2150  如果非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
2153  如果count大于等于temp的长度或count恒等于0则返回:负EINVAL
2156  如果copy_from_user(temp, buf, count)不等于0则返回:负EFAULT
2159  temp[count]等于'\0'
2161  如果sscanf - Unformat a buffer into a list of arguments*@buf: input buffer*@fmt: formatting of buffer*@...: resulting arguments不等于1则返回:负EINVAL
2163  如果i小于0或i大于3则返回:负EINVAL
2165  what events do we log* can be overwritten at run-time by /smack/logging等于i
2166  返回:count