Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\selinux\selinuxfs.c Create Date:2022-07-28 19:06:12
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:declaration for sel_write_load

Proto:static int sel_make_bools(struct selinux_fs_info *fsi)

Type:int

Parameter:

TypeParameterName
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  When i < bool_num cycle kfree(bool_pending_names[i])
1338  kfree(bool_pending_names)
1339  kfree(bool_pending_values)
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  If Not page Then Go to out
1351  ret = security_get_bools(state, & num, & names, & values)
1352  If ret Then Go to out
1355  When i < num cycle
1356  ret = -ENOMEM
1357  dentry = d_alloc_name(dir, names[i])
1358  If Not dentry Then Go to out
1361  ret = -ENOMEM
1362  inode = sel_make_inode( The root of the dentry tree , S_IFREG | S_IRUGO | S_IWUSR)
1363  If Not inode Then
1364  dput(dentry)
1365  Go to 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  If len >= PAGE_SIZE Then
1371  dput(dentry)
1372  put an inode
1373  Go to out
1376  isec = selinux_inode(inode)
1377  ret = security_genfs_sid(state, "selinuxfs", page, SECCLASS_FILE, & sid)
1379  If ret Then
1380  pr_warn_ratelimited("SELinux: no sid found, defaulting to security isid for %s\n", page)
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  d_add - add dentry to hash queues*@entry: dentry to add*@inode: The inode to attach to this dentry* This adds the entry to the hash queues and initializes @inode.* The entry was actually filled in earlier during d_alloc().
1391  bool_num = num
1392  bool_pending_names = names
1393  bool_pending_values = values
1395  free_page((unsignedlong)page)
1396  Return 0
1397  out :
1398  free_page((unsignedlong)page)
1400  If names Then
1401  When i < num cycle kfree(names[i])
1403  kfree(names)
1405  kfree(values)
1406  sel_remove_entries(dir)
1408  Return ret
Caller
NameDescribe
sel_make_policy_nodes