From: Yongqin Liu Date: Mon, 9 Jan 2017 15:07:30 +0000 (-0500) Subject: selinux: add security in-core xattr support for tracefs X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a2c7c6fbe5ab48f6e4ed22f4649c76d1efbfe643;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: William Roberts Acked-by: Stephen Smalley Signed-off-by: Paul Moore --- 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"); }