函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:sb_finish_set_opts

函数原型:static int sb_finish_set_opts(struct super_block *sb)

返回类型:int

参数:

类型参数名称
struct super_block *sb
539  sbsec等于s_security
540  root等于s_root
541  root_inode等于d_backing_inode - Get upper or lower inode we should be using*@upper: The upper layer* This is the helper that should be used to get at the inode that will be used* if this dentry were to be opened as a file. The inode may be on the upper
542  rc等于0
544  如果 labeling behavior 恒等于use xattr
550  如果非i_opflags按位与IOP_XATTR的值则
551  打印警告信息("SELinux: (dev %s, type %s) has no xattr support\n", Informational name , name)
553  rc等于负EOPNOTSUPP
554  转到:out
557  rc等于__vfs_getxattr(root, root_inode, XATTR_NAME_SELINUX, NULL, 0)
558  如果rc小于0且rc不等于负ENODATA
559  如果rc恒等于负EOPNOTSUPP打印警告信息("SELinux: (dev %s, type %s) has no security xattr handler\n", Informational name , name)
563  否则打印警告信息("SELinux: (dev %s, type %s) getxattr errno %d\n", Informational name , name, - rc)
567  转到:out
571  which mount options were specified 或等于Non-mount related flags
578  如果selinux_is_sblabel_mnt(sb)则 which mount options were specified 或等于SBLABEL_MNT
580  否则 which mount options were specified 与等于SBLABEL_MNT的反
584  rc等于inode_doinit_with_dentry(root_inode, root)
590  加自旋锁
591  当非链表为空循环
592  isec等于list_first_entry - get the first element from a list*@ptr: the list head to take the element from.*@type: the type of the struct this is embedded in.*@member: the name of the list_head within the struct.* Note, that list is expected to be not empty.( & isec_head, structinode_security_struct, list)
595  inode等于 back pointer to inode object
596  删除链表项并重新初始化
597  自旋锁解锁
598  inode等于igrab(inode)
599  如果inode
600  如果非IS_PRIVATE(inode)则inode_doinit(inode)
604  加自旋锁
606  自旋锁解锁
607  out :
608  返回:rc
调用者
名称描述
selinux_set_mnt_optsAllow filesystems with binary mount data to explicitly set mount point* labeling information.
selinux_sb_clone_mnt_opts