函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:declaration for sel_write_load

函数原型:static int sel_make_bools(struct selinux_fs_info *fsi)

返回类型:int

参数:

类型参数名称
struct selinux_fs_info *fsi
1326  struct dentry * dentry = NULL
1327  dir等于bool_dir
1328  struct inode * inode = NULL
1330  names等于NULL
1332  int * values = NULL
1336 i小于bool_num循环释放内存
1338  释放内存
1339  释放内存
1340  bool_num等于0
1341  bool_pending_names = NULL
1342  bool_pending_values = NULL
1344  sel_remove_entries(dir)
1346  ret等于负ENOMEM
1347  page等于get_zeroed_page(GFP_KERNEL)
1348  如果非page则转到:out
1351  ret等于security_get_bools(state, & num, & names, & values)
1352  如果ret则转到:out
1355 i小于num循环
1356  ret等于负ENOMEM
1357  dentry等于d_alloc_name(dir, names[i])
1358  如果非dentry则转到:out
1361  ret等于负ENOMEM
1362  inode等于sel_make_inode( The root of the dentry tree , S_IFREG | S_IRUGO | S_IWUSR)
1363  如果非inode
1364  dput(dentry)
1365  转到:out
1368  ret等于负ENAMETOOLONG
1369  len等于snprintf - Format a string and place it in a buffer*@buf: The buffer to place the result into*@size: The size of the buffer, including the trailing null space*@fmt: The format string to use*@
1370  如果len大于等于PAGE_SIZE
1371  dput(dentry)
1373  转到:out
1376  isec等于selinux_inode(inode)
1377  ret等于security_genfs_sid(state, "selinuxfs", page, SECCLASS_FILE, & sid)
1379  如果ret
1380  pr_warn_ratelimited("SELinux: no sid found, defaulting to security isid for %s\n", page)
1382  sid等于SECINITSID_SECURITY
1385  SID of this object 等于sid
1386  initialization flag 等于 initialized
1387  rmer ->i_op->default_file_ops 等于sel_bool_ops
1388  Stat data, not accessed from path walking 等于i按位或SEL_BOOL_INO_OFFSET
1389  添加目录项到哈希队列
1391  bool_num等于num
1392  bool_pending_names等于names
1393  bool_pending_values等于values
1395  free_page((unsignedlong)page)
1396  返回:0
1397  out :
1398  free_page((unsignedlong)page)
1400  如果names
1401 i小于num循环释放内存
1403  释放内存
1405  释放内存
1406  sel_remove_entries(dir)
1408  返回:ret
调用者
名称描述
sel_make_policy_nodes