函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:moyo_write_self - write() for /sys/kernel/security/tomoyo/self_domain interface

函数原型:static ssize_t tomoyo_write_self(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
47  如果非countcount大于等于TOMOYO_EXEC_TMPSIZE减10则返回:负ENOMEM
49  data等于memdup_user_nul - duplicate memory region from user space and NUL-terminate*@src: source address in user space*@len: number of bytes to copy* Return: an ERR_PTR() on failure.
50  如果是错误则返回:错误
52  tomoyo_normalize_line(data)
53  如果tomoyo_correct_domain(data)则
54  idx等于moyo_read_lock - Take lock for protecting policy.* Returns index number for tomoyo_read_unlock().
58  name等于data
59  tomoyo_fill_path_info( & name)
61  tomoyo_init_request_info( & r, NULL, TOMOYO_MAC_FILE_EXECUTE)
62  param_type等于TOMOYO_TYPE_MANUAL_TASK_ACL
63  domainname等于name
64  moyo_check_acl - Do permission check.*@r: Pointer to "struct tomoyo_request_info".*@check_entry: Callback function to check type specific parameters.* Returns 0 on success, negative value otherwise.* Caller holds tomoyo_read_lock().
65  如果非grantederror等于负EPERM
67  否则
70  如果非new_domain
71  error等于负ENOENT
72  否则
83  moyo_read_unlock - Release lock for protecting policy.*@idx: Index number returned by tomoyo_read_lock().* Returns nothing.
84  否则error等于负EINVAL
86  释放内存
87  返回:如果errorerror否则count