linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] security: selinux: allow per-file labeling for bpffs
@ 2020-02-06 16:55 Steven Moreland
  2020-02-06 17:21 ` Stephen Smalley
  0 siblings, 1 reply; 8+ messages in thread
From: Steven Moreland @ 2020-02-06 16:55 UTC (permalink / raw)
  To: paul, sds, eparis, keescook, anton, ccross, tony.luck, selinux,
	linux-kernel, kernel-team
  Cc: Connor O'Brien, Steven Moreland

From: Connor O'Brien <connoro@google.com>

Add support for genfscon per-file labeling of bpffs files. This allows
for separate permissions for different pinned bpf objects, which may
be completely unrelated to each other.

Change-Id: I03ae28d3afea70acd6dc53ebf810b34b357b6eb5
Signed-off-by: Connor O'Brien <connoro@google.com>
Signed-off-by: Steven Moreland <smoreland@google.com>
---
 security/selinux/hooks.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index de4887742d7c..4f9396e6ce8c 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -872,6 +872,7 @@ static int selinux_set_mnt_opts(struct super_block *sb,
 	    !strcmp(sb->s_type->name, "sysfs") ||
 	    !strcmp(sb->s_type->name, "pstore") ||
 	    !strcmp(sb->s_type->name, "binder") ||
+	    !strcmp(sb->s_type->name, "bpf") ||
 	    !strcmp(sb->s_type->name, "cgroup") ||
 	    !strcmp(sb->s_type->name, "cgroup2"))
 		sbsec->flags |= SE_SBGENFS;
-- 
2.25.0.341.g760bfbb309-goog


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-02-12 18:08 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-06 16:55 [PATCH] security: selinux: allow per-file labeling for bpffs Steven Moreland
2020-02-06 17:21 ` Stephen Smalley
2020-02-06 17:35   ` Stephen Smalley
2020-02-06 17:41     ` Steven Moreland
2020-02-06 18:12       ` Stephen Smalley
2020-02-12  3:17         ` Paul Moore
2020-02-12 17:46           ` Steven Moreland
2020-02-12 18:09             ` Stephen Smalley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).