Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:moyo_read_query - Read access requests which violated policy in enforcing mode.*@head: Pointer to "struct tomoyo_io_buffer".

Proto:static void tomoyo_read_query(struct tomoyo_io_buffer *head)

Type:void

Parameter:

TypeParameterName
struct tomoyo_io_buffer *head
2205  pos = 0
2206  len = 0
2209  If w_pos Then Return
2211  kfree(Buffer for reading. )
2212  Buffer for reading. = NULL
2213  spin_lock( & Lock for manipulating tomoyo_query_list. )
2215  ptr = list_entry - get the struct for this entry*@ptr: the &struct list_head pointer.*@type: the type of the struct this is embedded in.*@member: the name of the list_head within the struct.(tmp, typeof( * ptr), list)
2217  If pos++ != query_index Then Continue
2219  len = query_len
2220  Break
2222  spin_unlock( & Lock for manipulating tomoyo_query_list. )
2223  If Not len Then
2224  query_index = 0
2225  Return
2227  buf = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc).
2228  If Not buf Then Return
2230  pos = 0
2231  spin_lock( & Lock for manipulating tomoyo_query_list. )
2233  ptr = list_entry - get the struct for this entry*@ptr: the &struct list_head pointer.*@type: the type of the struct this is embedded in.*@member: the name of the list_head within the struct.(tmp, typeof( * ptr), list)
2235  If pos++ != query_index Then Continue
2241  If len == query_len Then snprintf - Format a string and place it in a buffer*@buf: The buffer to place the result into*@size: The size of the buffer, including the trailing null space*@fmt: The format string to use*@
2244  Break
2246  spin_unlock( & Lock for manipulating tomoyo_query_list. )
2247  If buf[0] Then
2248  Buffer for reading. = buf
2249  w[w_pos++] = buf
2250  query_index++
2251  Else
2252  kfree(buf)