函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:moyo_read_self - read() for /sys/kernel/security/tomoyo/self_domain interface.*@file: Pointer to "struct file".*@buf: Domainname which current thread belongs to.*@count: Size of @buf.*@ppos: Bytes read by now.

函数原型:static ssize_t tomoyo_read_self(struct file *file, char __user *buf, size_t count, loff_t *ppos)

返回类型:ssize_t

参数:

类型参数名称
struct file *file
char __user *buf
size_tcount
loff_t *ppos
103  domain等于name
104  len等于strlen - Find the length of a string*@s: The string to be sized
105  pos等于ppos
107  如果pos大于等于len或非count则返回:0
109  len减等于pos
110  如果count小于lenlen等于count
112  如果copy_to_user(buf, domain + pos, len)则返回:负EFAULT
114  ppos加等于len
115  返回:len