From 96d85d74d1c832e07c96ebbcaabb61e28b298d81 Mon Sep 17 00:00:00 2001 From: Hridya Valsaraju Date: Sun, 8 Dec 2019 12:43:44 -0800 Subject: [PATCH] FROMLIST: security: selinux: allow per-file labelling for binderfs This patch allows genfscon per-file labeling for binderfs. This is required to have separate permissions to allow access to binder, hwbinder and vndbinder devices which are relocating to binderfs. Acked-by: Jeff Vander Stoep Acked-by: Mark Salyzyn Signed-off-by: Hridya Valsaraju Signed-off-by: Sorayukii --- security/selinux/hooks.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index 994a7a87cb9b..6b33aa79a2c2 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c @@ -815,7 +815,8 @@ static int selinux_set_mnt_opts(struct super_block *sb, !strcmp(sb->s_type->name, "tracefs") || !strcmp(sb->s_type->name, "sysfs") || !strcmp(sb->s_type->name, "pstore") || - !strcmp(sb->s_type->name, "bpf")) + !strcmp(sb->s_type->name, "bpf") || + !strcmp(sb->s_type->name, "binder")) sbsec->flags |= SE_SBGENFS; if (!sbsec->behavior) {