sbsec             335 security/selinux/hooks.c 	struct superblock_security_struct *sbsec;
sbsec             339 security/selinux/hooks.c 	sbsec = inode->i_sb->s_security;
sbsec             351 security/selinux/hooks.c 		spin_lock(&sbsec->isec_lock);
sbsec             353 security/selinux/hooks.c 		spin_unlock(&sbsec->isec_lock);
sbsec             370 security/selinux/hooks.c 	struct superblock_security_struct *sbsec;
sbsec             372 security/selinux/hooks.c 	sbsec = kzalloc(sizeof(struct superblock_security_struct), GFP_KERNEL);
sbsec             373 security/selinux/hooks.c 	if (!sbsec)
sbsec             376 security/selinux/hooks.c 	mutex_init(&sbsec->lock);
sbsec             377 security/selinux/hooks.c 	INIT_LIST_HEAD(&sbsec->isec_head);
sbsec             378 security/selinux/hooks.c 	spin_lock_init(&sbsec->isec_lock);
sbsec             379 security/selinux/hooks.c 	sbsec->sb = sb;
sbsec             380 security/selinux/hooks.c 	sbsec->sid = SECINITSID_UNLABELED;
sbsec             381 security/selinux/hooks.c 	sbsec->def_sid = SECINITSID_FILE;
sbsec             382 security/selinux/hooks.c 	sbsec->mntpoint_sid = SECINITSID_UNLABELED;
sbsec             383 security/selinux/hooks.c 	sb->s_security = sbsec;
sbsec             390 security/selinux/hooks.c 	struct superblock_security_struct *sbsec = sb->s_security;
sbsec             392 security/selinux/hooks.c 	kfree(sbsec);
sbsec             460 security/selinux/hooks.c 			struct superblock_security_struct *sbsec,
sbsec             467 security/selinux/hooks.c 			  tsec->sid, sbsec->sid, SECCLASS_FILESYSTEM,
sbsec             479 security/selinux/hooks.c 			struct superblock_security_struct *sbsec,
sbsec             485 security/selinux/hooks.c 			  tsec->sid, sbsec->sid, SECCLASS_FILESYSTEM,
sbsec             491 security/selinux/hooks.c 			  sid, sbsec->sid, SECCLASS_FILESYSTEM,
sbsec             511 security/selinux/hooks.c 	struct superblock_security_struct *sbsec = sb->s_security;
sbsec             519 security/selinux/hooks.c 	switch (sbsec->behavior) {
sbsec             539 security/selinux/hooks.c 	struct superblock_security_struct *sbsec = sb->s_security;
sbsec             544 security/selinux/hooks.c 	if (sbsec->behavior == SECURITY_FS_USE_XATTR) {
sbsec             571 security/selinux/hooks.c 	sbsec->flags |= SE_SBINITIALIZED;
sbsec             579 security/selinux/hooks.c 		sbsec->flags |= SBLABEL_MNT;
sbsec             581 security/selinux/hooks.c 		sbsec->flags &= ~SBLABEL_MNT;
sbsec             590 security/selinux/hooks.c 	spin_lock(&sbsec->isec_lock);
sbsec             591 security/selinux/hooks.c 	while (!list_empty(&sbsec->isec_head)) {
sbsec             593 security/selinux/hooks.c 				list_first_entry(&sbsec->isec_head,
sbsec             597 security/selinux/hooks.c 		spin_unlock(&sbsec->isec_lock);
sbsec             604 security/selinux/hooks.c 		spin_lock(&sbsec->isec_lock);
sbsec             606 security/selinux/hooks.c 	spin_unlock(&sbsec->isec_lock);
sbsec             611 security/selinux/hooks.c static int bad_option(struct superblock_security_struct *sbsec, char flag,
sbsec             614 security/selinux/hooks.c 	char mnt_flags = sbsec->flags & SE_MNTMASK;
sbsec             617 security/selinux/hooks.c 	if (sbsec->flags & SE_SBINITIALIZED)
sbsec             618 security/selinux/hooks.c 		if (!(sbsec->flags & flag) ||
sbsec             625 security/selinux/hooks.c 	if (!(sbsec->flags & SE_SBINITIALIZED))
sbsec             652 security/selinux/hooks.c 	struct superblock_security_struct *sbsec = sb->s_security;
sbsec             653 security/selinux/hooks.c 	struct dentry *root = sbsec->sb->s_root;
sbsec             660 security/selinux/hooks.c 	mutex_lock(&sbsec->lock);
sbsec             692 security/selinux/hooks.c 	if ((sbsec->flags & SE_SBINITIALIZED) && (sb->s_type->fs_flags & FS_BINARY_MOUNTDATA)
sbsec             708 security/selinux/hooks.c 			if (bad_option(sbsec, FSCONTEXT_MNT, sbsec->sid,
sbsec             711 security/selinux/hooks.c 			sbsec->flags |= FSCONTEXT_MNT;
sbsec             717 security/selinux/hooks.c 			if (bad_option(sbsec, CONTEXT_MNT, sbsec->mntpoint_sid,
sbsec             720 security/selinux/hooks.c 			sbsec->flags |= CONTEXT_MNT;
sbsec             726 security/selinux/hooks.c 			if (bad_option(sbsec, ROOTCONTEXT_MNT, root_isec->sid,
sbsec             729 security/selinux/hooks.c 			sbsec->flags |= ROOTCONTEXT_MNT;
sbsec             735 security/selinux/hooks.c 			if (bad_option(sbsec, DEFCONTEXT_MNT, sbsec->def_sid,
sbsec             738 security/selinux/hooks.c 			sbsec->flags |= DEFCONTEXT_MNT;
sbsec             742 security/selinux/hooks.c 	if (sbsec->flags & SE_SBINITIALIZED) {
sbsec             744 security/selinux/hooks.c 		if ((sbsec->flags & SE_MNTMASK) && !opts)
sbsec             751 security/selinux/hooks.c 		sbsec->flags |= SE_SBPROC | SE_SBGENFS;
sbsec             756 security/selinux/hooks.c 		sbsec->flags |= SE_SBGENFS;
sbsec             761 security/selinux/hooks.c 		sbsec->flags |= SE_SBGENFS | SE_SBGENFS_XATTR;
sbsec             763 security/selinux/hooks.c 	if (!sbsec->behavior) {
sbsec             790 security/selinux/hooks.c 		if (sbsec->behavior == SECURITY_FS_USE_XATTR) {
sbsec             791 security/selinux/hooks.c 			sbsec->behavior = SECURITY_FS_USE_MNTPOINT;
sbsec             796 security/selinux/hooks.c 						     &sbsec->mntpoint_sid);
sbsec             805 security/selinux/hooks.c 		rc = may_context_mount_sb_relabel(fscontext_sid, sbsec, cred);
sbsec             809 security/selinux/hooks.c 		sbsec->sid = fscontext_sid;
sbsec             818 security/selinux/hooks.c 		sbsec->behavior = SECURITY_FS_USE_NATIVE;
sbsec             824 security/selinux/hooks.c 			rc = may_context_mount_sb_relabel(context_sid, sbsec,
sbsec             828 security/selinux/hooks.c 			sbsec->sid = context_sid;
sbsec             830 security/selinux/hooks.c 			rc = may_context_mount_inode_relabel(context_sid, sbsec,
sbsec             838 security/selinux/hooks.c 		sbsec->mntpoint_sid = context_sid;
sbsec             839 security/selinux/hooks.c 		sbsec->behavior = SECURITY_FS_USE_MNTPOINT;
sbsec             843 security/selinux/hooks.c 		rc = may_context_mount_inode_relabel(rootcontext_sid, sbsec,
sbsec             853 security/selinux/hooks.c 		if (sbsec->behavior != SECURITY_FS_USE_XATTR &&
sbsec             854 security/selinux/hooks.c 			sbsec->behavior != SECURITY_FS_USE_NATIVE) {
sbsec             861 security/selinux/hooks.c 		if (defcontext_sid != sbsec->def_sid) {
sbsec             863 security/selinux/hooks.c 							     sbsec, cred);
sbsec             868 security/selinux/hooks.c 		sbsec->def_sid = defcontext_sid;
sbsec             874 security/selinux/hooks.c 	mutex_unlock(&sbsec->lock);
sbsec            1100 security/selinux/hooks.c 	struct superblock_security_struct *sbsec = sb->s_security;
sbsec            1103 security/selinux/hooks.c 	if (!(sbsec->flags & SE_SBINITIALIZED))
sbsec            1109 security/selinux/hooks.c 	if (sbsec->flags & FSCONTEXT_MNT) {
sbsec            1112 security/selinux/hooks.c 		rc = show_sid(m, sbsec->sid);
sbsec            1116 security/selinux/hooks.c 	if (sbsec->flags & CONTEXT_MNT) {
sbsec            1119 security/selinux/hooks.c 		rc = show_sid(m, sbsec->mntpoint_sid);
sbsec            1123 security/selinux/hooks.c 	if (sbsec->flags & DEFCONTEXT_MNT) {
sbsec            1126 security/selinux/hooks.c 		rc = show_sid(m, sbsec->def_sid);
sbsec            1130 security/selinux/hooks.c 	if (sbsec->flags & ROOTCONTEXT_MNT) {
sbsec            1131 security/selinux/hooks.c 		struct dentry *root = sbsec->sb->s_root;
sbsec            1139 security/selinux/hooks.c 	if (sbsec->flags & SBLABEL_MNT) {
sbsec            1433 security/selinux/hooks.c 	struct superblock_security_struct *sbsec = NULL;
sbsec            1450 security/selinux/hooks.c 	sbsec = inode->i_sb->s_security;
sbsec            1451 security/selinux/hooks.c 	if (!(sbsec->flags & SE_SBINITIALIZED)) {
sbsec            1455 security/selinux/hooks.c 		spin_lock(&sbsec->isec_lock);
sbsec            1457 security/selinux/hooks.c 			list_add(&isec->list, &sbsec->isec_head);
sbsec            1458 security/selinux/hooks.c 		spin_unlock(&sbsec->isec_lock);
sbsec            1468 security/selinux/hooks.c 	switch (sbsec->behavior) {
sbsec            1473 security/selinux/hooks.c 			sid = sbsec->def_sid;
sbsec            1505 security/selinux/hooks.c 		rc = inode_doinit_use_xattr(inode, dentry, sbsec->def_sid,
sbsec            1516 security/selinux/hooks.c 		sid = sbsec->sid;
sbsec            1525 security/selinux/hooks.c 		sid = sbsec->mntpoint_sid;
sbsec            1529 security/selinux/hooks.c 		sid = sbsec->sid;
sbsec            1531 security/selinux/hooks.c 		if ((sbsec->flags & SE_SBGENFS) && !S_ISLNK(inode->i_mode)) {
sbsec            1559 security/selinux/hooks.c 						   sbsec->flags, &sid);
sbsec            1565 security/selinux/hooks.c 			if ((sbsec->flags & SE_SBGENFS_XATTR) &&
sbsec            1791 security/selinux/hooks.c 	const struct superblock_security_struct *sbsec = dir->i_sb->s_security;
sbsec            1793 security/selinux/hooks.c 	if ((sbsec->flags & SE_SBINITIALIZED) &&
sbsec            1794 security/selinux/hooks.c 	    (sbsec->behavior == SECURITY_FS_USE_MNTPOINT)) {
sbsec            1795 security/selinux/hooks.c 		*_new_isid = sbsec->mntpoint_sid;
sbsec            1796 security/selinux/hooks.c 	} else if ((sbsec->flags & SBLABEL_MNT) &&
sbsec            1816 security/selinux/hooks.c 	struct superblock_security_struct *sbsec;
sbsec            1822 security/selinux/hooks.c 	sbsec = dir->i_sb->s_security;
sbsec            1847 security/selinux/hooks.c 			    newsid, sbsec->sid,
sbsec            1968 security/selinux/hooks.c 	struct superblock_security_struct *sbsec;
sbsec            1971 security/selinux/hooks.c 	sbsec = sb->s_security;
sbsec            1973 security/selinux/hooks.c 			    sid, sbsec->sid, SECCLASS_FILESYSTEM, perms, ad);
sbsec            2685 security/selinux/hooks.c 	struct superblock_security_struct *sbsec = sb->s_security;
sbsec            2689 security/selinux/hooks.c 	if (!(sbsec->flags & SE_SBINITIALIZED))
sbsec            2699 security/selinux/hooks.c 		if (bad_option(sbsec, FSCONTEXT_MNT, sbsec->sid, sid))
sbsec            2706 security/selinux/hooks.c 		if (bad_option(sbsec, CONTEXT_MNT, sbsec->mntpoint_sid, sid))
sbsec            2715 security/selinux/hooks.c 		if (bad_option(sbsec, ROOTCONTEXT_MNT, root_isec->sid, sid))
sbsec            2722 security/selinux/hooks.c 		if (bad_option(sbsec, DEFCONTEXT_MNT, sbsec->def_sid, sid))
sbsec            2912 security/selinux/hooks.c 	struct superblock_security_struct *sbsec;
sbsec            2917 security/selinux/hooks.c 	sbsec = dir->i_sb->s_security;
sbsec            2929 security/selinux/hooks.c 	if (sbsec->flags & SE_SBINITIALIZED) {
sbsec            2936 security/selinux/hooks.c 	if (!selinux_state.initialized || !(sbsec->flags & SBLABEL_MNT))
sbsec            3144 security/selinux/hooks.c 	struct superblock_security_struct *sbsec;
sbsec            3159 security/selinux/hooks.c 	sbsec = inode->i_sb->s_security;
sbsec            3160 security/selinux/hooks.c 	if (!(sbsec->flags & SBLABEL_MNT))
sbsec            3222 security/selinux/hooks.c 			    sbsec->sid,
sbsec            3384 security/selinux/hooks.c 	struct superblock_security_struct *sbsec = inode->i_sb->s_security;
sbsec            3391 security/selinux/hooks.c 	if (!(sbsec->flags & SBLABEL_MNT))
sbsec            2755 security/selinux/ss/services.c 	struct superblock_security_struct *sbsec = sb->s_security;
sbsec            2771 security/selinux/ss/services.c 		sbsec->behavior = c->v.behavior;
sbsec            2778 security/selinux/ss/services.c 		sbsec->sid = c->sid[0];
sbsec            2781 security/selinux/ss/services.c 					  &sbsec->sid);
sbsec            2783 security/selinux/ss/services.c 			sbsec->behavior = SECURITY_FS_USE_NONE;
sbsec            2786 security/selinux/ss/services.c 			sbsec->behavior = SECURITY_FS_USE_GENFS;