函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:smk_read_ambient - read() for /smack/ambient*@filp: file pointer, not actually used*@buf: where to put the result*@cn: maximum to send along*@ppos: where to start* Returns number of bytes read or error code, as appropriate

函数原型:static ssize_t smk_read_ambient(struct file *filp, char __user *buf, size_t cn, loff_t *ppos)

返回类型:ssize_t

参数:

类型参数名称
struct file *filp
char __user *buf
size_tcn
loff_t *ppos
1777  如果ppos不等于0则返回:0
1783  mutex_lock( & smack_ambient_lock)
1785  asize等于strlen - Find the length of a string*@s: The string to be sized加1
1787  如果cn大于等于asizerc等于simple_read_from_buffer(buf, cn, ppos, smk_known, asize)
1791  否则rc等于负EINVAL
1794  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.
1796  返回:rc