Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\tomoyo\common.c Create Date:2022-07-28 19:37:15
Last Modify:2020-03-18 09:15:18 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

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

Proto:ssize_t tomoyo_read_control(struct tomoyo_io_buffer *head, char __user *buffer, const int buffer_len)

Type:ssize_t

Parameter:

TypeParameterName
struct tomoyo_io_buffer *head
char __user *buffer
const intbuffer_len
2588  If Not read Then Return -EINVAL
2590  If mutex_lock_interruptible( & Exclusive lock for this structure. ) Then Return -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  If 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. Then Do
2598  moyo_set_namespace_cursor - Set namespace to read.*@head: Pointer to "struct tomoyo_io_buffer".* Returns nothing.
2599  read(head)
2600  When 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. cycle
2602  moyo_read_unlock - Release lock for protecting policy.*@idx: Index number returned by tomoyo_read_lock().* Returns nothing.
2603  len = read_user_buf - buffer
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  Return len
Caller
NameDescribe
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.