linux-stable/security/selinux
Ondrej Mosnacek b754026bd9 selinux: try security xattr after genfs for kernfs filesystems
Since kernfs supports the security xattr handlers, we can simply use
these to determine the inode's context, dropping the need to update it
from kernfs explicitly using a security_inode_notifysecctx() call.

We achieve this by setting a new sbsec flag SE_SBGENFS_XATTR to all
mounts that are known to use kernfs under the hood and then fetching the
xattrs after determining the fallback genfs sid in
inode_doinit_with_dentry() when this flag is set.

This will allow implementing full security xattr support in kernfs and
removing the ...notifysecctx() call in a subsequent patch.

Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>
Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
Acked-by: Casey Schaufler <casey@schaufler-ca.com>
[PM: more manual merge fixups]
Signed-off-by: Paul Moore <paul@paul-moore.com>
2019-03-20 21:53:04 -04:00
..
include selinux: try security xattr after genfs for kernfs filesystems 2019-03-20 21:53:04 -04:00
ss selinux: convert to kvmalloc 2019-03-12 10:04:02 -07:00
.gitignore
avc.c selinux: fix avc audit messages 2019-02-05 12:34:33 -05:00
hooks.c selinux: try security xattr after genfs for kernfs filesystems 2019-03-20 21:53:04 -04:00
ibpkey.c selinux: wrap global selinux state 2018-03-01 18:48:02 -05:00
Kconfig selinux: Remove SECURITY_SELINUX_BOOTPARAM_VALUE 2019-01-08 13:18:43 -08:00
Makefile SELinux: Remove unused selinux_is_enabled 2019-01-08 13:18:44 -08:00
netif.c selinux: Cleanup printk logging in netif 2018-06-19 13:45:31 -04:00
netlabel.c selinux: wrap AVC state 2018-03-20 16:58:17 -04:00
netlink.c selinux: Cleanup printk logging in netlink 2018-06-19 13:33:05 -04:00
netnode.c selinux: Cleanup printk logging in netnode 2018-06-19 13:49:10 -04:00
netport.c selinux: Cleanup printk logging in netport 2018-06-19 13:43:01 -04:00
nlmsgtab.c selinux: add support for RTM_NEWCHAIN, RTM_DELCHAIN, and RTM_GETCHAIN 2018-11-29 11:32:02 -05:00
selinuxfs.c SELinux: Abstract use of inode security blob 2019-01-08 13:18:44 -08:00
xfrm.c SELinux: Abstract use of cred security blob 2019-01-08 13:18:44 -08:00