summaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorYongqin Liu <yongqin.liu@linaro.org>2017-01-09 10:07:30 -0500
committerPaul Moore <paul@paul-moore.com>2017-01-09 10:07:30 -0500
commita2c7c6fbe5ab48f6e4ed22f4649c76d1efbfe643 (patch)
tree2caef6503195a55ea72bff5bb5e70dcd7e42a3e4 /security
parentda69a5306ab92e07224da54aafee8b1dccf024f6 (diff)
downloadlinux-a2c7c6fbe5ab48f6e4ed22f4649c76d1efbfe643.tar.gz
linux-a2c7c6fbe5ab48f6e4ed22f4649c76d1efbfe643.tar.bz2
linux-a2c7c6fbe5ab48f6e4ed22f4649c76d1efbfe643.zip
selinux: add security in-core xattr support for tracefs
Since kernel 4.1 ftrace is supported as a new separate filesystem. It gets automatically mounted by the kernel under the old path /sys/kernel/debug/tracing. Because it lives now on a separate filesystem SELinux needs to be updated to also support setting SELinux labels on tracefs inodes. This is required for compatibility in Android when moving to Linux 4.1 or newer. Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org> Signed-off-by: William Roberts <william.c.roberts@intel.com> Acked-by: Stephen Smalley <sds@tycho.nsa.gov> Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'security')
-rw-r--r--security/selinux/hooks.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index 74cd3a689cf8..5ce633aabce6 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -492,6 +492,7 @@ static int selinux_is_sblabel_mnt(struct super_block *sb)
!strcmp(sb->s_type->name, "sysfs") ||
!strcmp(sb->s_type->name, "pstore") ||
!strcmp(sb->s_type->name, "debugfs") ||
+ !strcmp(sb->s_type->name, "tracefs") ||
!strcmp(sb->s_type->name, "rootfs");
}