函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:moyo_read_control - read() for /sys/kernel/security/tomoyo/ interface.*@head: Pointer to "struct tomoyo_io_buffer".*@buffer: Poiner to buffer to write to.*@buffer_len: Size of @buffer.* Returns bytes read on success, negative value otherwise.

函数原型:ssize_t tomoyo_read_control(struct tomoyo_io_buffer *head, char __user *buffer, const int buffer_len)

返回类型:ssize_t

参数:

类型参数名称
struct tomoyo_io_buffer *head
char __user *buffer
const intbuffer_len
2588  如果非read则返回:负EINVAL
2590  如果mutex_lock_interruptible( & Exclusive lock for this structure. )则返回:负EINTR
2592  read_user_buf等于buffer
2593  read_user_buf_avail等于buffer_len
2594  idx等于moyo_read_lock - Take lock for protecting policy.* Returns index number for tomoyo_read_unlock().
2595  如果moyo_flush - Flush queued string to userspace's buffer.*@head: Pointer to "struct tomoyo_io_buffer".* Returns true if all data was flushed, false otherwise.循环
2598  moyo_set_namespace_cursor - Set namespace to read.*@head: Pointer to "struct tomoyo_io_buffer".* Returns nothing.
2599  read(head)
2600 moyo_flush - Flush queued string to userspace's buffer.*@head: Pointer to "struct tomoyo_io_buffer".* Returns true if all data was flushed, false otherwise.moyo_has_more_namespace - Check for unread namespaces.*@head: Pointer to "struct tomoyo_io_buffer".* Returns true if we have more entries to print, false otherwise.循环
2602  moyo_read_unlock - Release lock for protecting policy.*@idx: Index number returned by tomoyo_read_lock().* Returns nothing.
2603  len等于read_user_bufbuffer
2604  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.
2605  返回:len
调用者
名称描述
tomoyo_readmoyo_read - read() for /sys/kernel/security/tomoyo/ interface.*@file: Pointer to "struct file".*@buf: Pointer to buffer.*@count: Size of @buf.*@ppos: Unused.* Returns bytes read on success, negative value otherwise.