函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:avc_has_perm_noaudit - Check permissions but perform no auditing

函数原型:inline int avc_has_perm_noaudit(struct selinux_state *state, unsigned int ssid, unsigned int tsid, u16 tclass, unsigned int requested, unsigned int flags, struct av_decision *avd)

返回类型:int

参数:

类型参数名称
struct selinux_state *state
unsigned intssid
unsigned inttsid
u16tclass
unsigned intrequested
unsigned intflags
struct av_decision *avd
1137  rc等于0
1140  如果WARN_ON(!requested)则返回:负EACCES
1143  _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
1145  node等于avc_lookup - Look up an AVC entry.*@ssid: source security identifier*@tsid: target security identifier*@tclass: target security class* Look up an AVC entry that is valid for the* (@ssid, @tsid), interpreting the permissions* based on @tclass
1146  如果此条件成立可能性小(为编译器优化)(!node)则node等于Slow-path helper function for avc_has_perm_noaudit,* when the avc_node lookup fails
1148  否则memcpy(avd, & avd, avd的长度)
1151  denied等于requested按位与allowed的反
1152  如果此条件成立可能性小(为编译器优化)(denied)则rc等于avc_denied(state, ssid, tsid, tclass, requested, 0, 0, flags, avd)
1156  _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()
1157  返回:rc
调用者
名称描述
avc_has_permavc_has_perm - Check permissions and perform any appropriate auditing
avc_has_perm_flags
cred_has_capabilityCheck whether a task is allowed to use a capability.
selinux_inode_permission