函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:selinux_genfs_get_sid

函数原型:static int selinux_genfs_get_sid(struct dentry *dentry, u16 tclass, u16 flags, unsigned int *sid)

返回类型:int

参数:

类型参数名称
struct dentry *dentry
u16tclass
u16flags
unsigned int *sid
1337  sb等于 The root of the dentry tree
1340  buffer等于__get_free_page(GFP_KERNEL)
1341  如果非buffer则返回:负ENOMEM
1344  path等于dentry_path_raw(dentry, buffer, PAGE_SIZE)
1345  如果是错误rc等于错误
1347  否则
1348  如果flags按位与SE_SBPROC
1352 path[1]大于等于'0'且path[1]小于等于'9'循环
1353  path[1]等于'/'
1354  path自加
1357  rc等于security_genfs_sid( & selinux_state, name, path, tclass, sid)
1359  如果rc恒等于负ENOENT
1362  rc等于0
1365  free_page((unsignedlong)buffer)
1366  返回:rc
调用者
名称描述
inode_doinit_with_dentry