Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name: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.

Proto:static ssize_t tomoyo_read_self(struct file *file, char __user *buf, size_t count, loff_t *ppos)

Type:ssize_t

Parameter:

TypeParameterName
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  If pos >= len || Not count Then Return 0
109  len -= pos
110  If count < len Then len = count
112  If copy_to_user(buf, domain + pos, len) Then Return -EFAULT
114  ppos += len
115  Return len