函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\selinux\hooks.c Create Date:2022-07-27 20:34:02
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:selinux_getprocattr

函数原型:static int selinux_getprocattr(struct task_struct *p, char *name, char **value)

返回类型:int

参数:

类型参数名称
struct task_struct *p
char *name
char **value
6290  _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
6291  __tsec等于selinux_cred(__task_cred - Access a task's objective credentials*@task: The task to query* Access the objective credentials of a task. The caller must hold the RCU* readlock.* The result of this function should not be passed directly to get_cred();(p))
6293  如果当前进程不等于p
6294  error等于avc_has_perm - Check permissions and perform any appropriate auditing
6297  如果error则转到:bad
6301  如果非字符串比较sid等于 current SID
6303  否则如果非字符串比较sid等于 SID prior to last execve
6305  否则如果非字符串比较sid等于 exec SID
6307  否则如果非字符串比较sid等于 fscreate SID
6309  否则如果非字符串比较sid等于 keycreate SID
6311  否则如果非字符串比较sid等于 fscreate SID
6313  否则
6314  error等于负EINVAL
6315  转到:bad
6317  _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()
6319  如果非sid则返回:0
6322  error等于security_sid_to_context( & selinux_state, sid, value, & len)
6323  如果error则返回:error
6325  返回:len
6327  bad :
6328  _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()
6329  返回:error