函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:moyo_select_domain - Parse select command.*@head: Pointer to "struct tomoyo_io_buffer".*@data: String to parse.* Returns true on success, false otherwise.* Caller holds tomoyo_read_lock().

函数原型:static bool tomoyo_select_domain(struct tomoyo_io_buffer *head, const char *data)

返回类型:bool

参数:

类型参数名称
struct tomoyo_io_buffer *head
const char *data
994  struct tomoyo_domain_info * domain = NULL
995  bool global_pid = false
997  如果字符串指定长度比较则返回:false
999  data加等于7
1000  如果(sscanf - Unformat a buffer into a list of arguments*@buf: input buffer*@fmt: formatting of buffer*@...: resulting arguments == 1 || (global_pid = true, sscanf - Unformat a buffer into a list of arguments*@buf: input buffer*@fmt: formatting of buffer*@...: resulting arguments == 1))则
1004  _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
1005  如果global_pidp等于Must be called under rcu_read_lock().
1007  否则p等于find_task_by_vpid(pid)
1009  如果pdomain等于domain_info
1011  _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()
1012  否则如果非字符串指定长度比较
1013  如果tomoyo_domain_def(data + 7)则domain等于moyo_find_domain - Find a domain by the given name.*@domainname: The domainname to find.* Returns pointer to "struct tomoyo_domain_info" if found, NULL otherwise.* Caller holds tomoyo_read_lock().
1015  否则如果sscanf - Unformat a buffer into a list of arguments*@buf: input buffer*@fmt: formatting of buffer*@...: resulting arguments恒等于1则
1016  domain等于tomoyo_find_domain_by_qid(pid)
1017  否则返回:false
1019  The position currently writing to. 等于domain
1021  如果非Buffer for reading. 则返回:true
1023  memset( & r, 0, r的长度)
1024  print_this_domain_only = true
1025  如果domaindomain等于list
1027  否则eof等于1
1029  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.
1030  如果domain Delete flag. 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.
1032  返回:true
调用者
名称描述
tomoyo_write_controlmoyo_write_control - write() for /sys/kernel/security/tomoyo/ interface.*@head: Pointer to "struct tomoyo_io_buffer".*@buffer: Pointer to buffer to read from.*@buffer_len: Size of @buffer.* Returns @buffer_len on success, negative value otherwise.