函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:moyo_read_pid - Get domainname of the specified PID

函数原型:static void tomoyo_read_pid(struct tomoyo_io_buffer *head)

返回类型:void

参数:

类型参数名称
struct tomoyo_io_buffer *head
1698  buf等于Buffer for writing.
1699  bool global_pid = false
1702  struct tomoyo_domain_info * domain = NULL
1705  如果非buf
1706  eof = true
1707  返回
1709  如果w_poseof则返回
1711  eof = true
1712  如果tomoyo_str_starts( & buf, "global-pid ")则global_pid = true
1714  如果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.则返回
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  如果global_pidp等于Must be called under rcu_read_lock().
1719  否则p等于find_task_by_vpid(pid)
1721  如果pdomain等于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  如果非domain则返回
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