函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:__devcgroup_check_permission - checks if an inode operation is permitted*@dev_cgroup: the dev cgroup to be tested against*@type: device type*@major: device major number*@minor: device minor number*@access: combination of DEVCG_ACC_WRITE, DEVCG_ACC_READ

函数原型:static int __devcgroup_check_permission(short type, unsigned int major, unsigned int minor, short access)

返回类型:int

参数:

类型参数名称
shorttype
unsigned intmajor
unsigned intminor
shortaccess
810  _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
811  dev_cgroup等于task_devcgroup(当前进程)
812  如果behavior恒等于DEVCG_DEFAULT_ALLOWrc等于非match_exception_partial - iterates the exception list trying to find a partial match*@exceptions: list of exceptions*@type: device type (DEVCG_DEV_BLOCK or DEVCG_DEV_CHAR)*@major: device file major number, ~0 to match all*@minor: device file minor number,
816  否则rc等于match_exception - iterates the exception list trying to find a complete match*@exceptions: list of exceptions*@type: device type (DEVCG_DEV_BLOCK or DEVCG_DEV_CHAR)*@major: device file major number, ~0 to match all*@minor: device file minor number, ~0 to
820  _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()
822  如果非rc则返回:负EPERM
825  返回:0
调用者
名称描述
devcgroup_check_permission