Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:moyo_read_pid - Get domainname of the specified PID

Proto:static void tomoyo_read_pid(struct tomoyo_io_buffer *head)

Type:void

Parameter:

TypeParameterName
struct tomoyo_io_buffer *head
1698  buf = Buffer for writing.
1699  bool global_pid = false
1702  struct tomoyo_domain_info * domain = NULL
1705  If Not buf Then
1706  eof = true
1707  Return
1709  If w_pos || eof Then Return
1711  eof = true
1712  If tomoyo_str_starts( & buf, "global-pid ") Then global_pid = true
1714  If kstrtouint - convert a string to an unsigned int*@s: The start of the string. The string must be null-terminated, and may also* include a single newline before its terminating null. The first character* may also be a plus sign, but not a minus sign. Then Return
1716  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
1717  If global_pid Then p = Must be called under rcu_read_lock().
1719  Else p = find_task_by_vpid(pid)
1721  If p Then domain = domain_info
1723  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
1724  If Not domain Then Return
1726  moyo_io_printf - printf() to "struct tomoyo_io_buffer" structure.*@head: Pointer to "struct tomoyo_io_buffer".*@fmt: The printf()'s format string, followed by parameters.
1727  moyo_set_string - Queue string to "struct tomoyo_io_buffer" structure