函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:selinux_inode_permission

函数原型:static int selinux_inode_permission(struct inode *inode, int mask)

返回类型:int

参数:

类型参数名称
struct inode *inode
intmask
3041  cred等于current_cred - Access the current task's subjective credentials* Access the subjective credentials of the current task. RCU-safe,* since nobody else can modify it.()
3044  flags等于mask按位与called from RCU mode, don't block
3051  from_access等于mask按位与MAY_ACCESS
3052  mask与等于MAY_READ按位或MAY_WRITE按位或MAY_EXEC按位或MAY_APPEND
3055  如果非mask则返回:0
3058  validate_creds(cred)
3060  如果此条件成立可能性小(为编译器优化)(IS_PRIVATE(inode))则返回:0
3063  perms等于Convert a Linux mode and permission mask to an access vector.
3065  sid等于get the security ID of a set of credentials
3066  isec等于inode_security_rcu(inode, flags & called from RCU mode, don't block )
3067  如果是错误则返回:错误
3070  rc等于avc_has_perm_noaudit - Check permissions but perform no auditing
3074  audited等于avc_audit_required(perms, & avd, rc, from_access ? FILE__AUDIT_ACCESS : 0, & denied)
3077  如果此条件成立可能性大(为编译器优化)(!audited)则返回:rc
3081  如果flags按位与called from RCU mode, don't block 则返回:负ECHILD
3084  rc2等于audit_inode_permission(inode, perms, audited, denied, rc)
3085  如果rc2则返回:rc2
3087  返回:rc