* [PATCH v3] security: selinux: allow per-file labeling for bpffs
@ 2020-02-07 18:01 Steven Moreland
2020-02-07 18:12 ` Stephen Smalley
2020-02-12 3:07 ` Paul Moore
0 siblings, 2 replies; 3+ messages in thread
From: Steven Moreland @ 2020-02-07 18:01 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.
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 d9e8b2131a65..18f8cd47729c 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -699,6 +699,7 @@ static int selinux_set_mnt_opts(struct super_block *sb,
if (!strcmp(sb->s_type->name, "debugfs") ||
!strcmp(sb->s_type->name, "tracefs") ||
!strcmp(sb->s_type->name, "binderfs") ||
+ !strcmp(sb->s_type->name, "bpf") ||
!strcmp(sb->s_type->name, "pstore"))
sbsec->flags |= SE_SBGENFS;
--
2.25.0.341.g760bfbb309-goog
v2 -> v3
- on selinux next branch (instead of master)
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v3] security: selinux: allow per-file labeling for bpffs
2020-02-07 18:01 [PATCH v3] security: selinux: allow per-file labeling for bpffs Steven Moreland
@ 2020-02-07 18:12 ` Stephen Smalley
2020-02-12 3:07 ` Paul Moore
1 sibling, 0 replies; 3+ messages in thread
From: Stephen Smalley @ 2020-02-07 18:12 UTC (permalink / raw)
To: Steven Moreland, paul, eparis, keescook, anton, ccross,
tony.luck, selinux, linux-kernel, kernel-team
Cc: Connor O'Brien
On 2/7/20 1:01 PM, Steven Moreland wrote:
> 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.
>
> Signed-off-by: Connor O'Brien <connoro@google.com>
> Signed-off-by: Steven Moreland <smoreland@google.com>
Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
> ---
> security/selinux/hooks.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
> index d9e8b2131a65..18f8cd47729c 100644
> --- a/security/selinux/hooks.c
> +++ b/security/selinux/hooks.c
> @@ -699,6 +699,7 @@ static int selinux_set_mnt_opts(struct super_block *sb,
> if (!strcmp(sb->s_type->name, "debugfs") ||
> !strcmp(sb->s_type->name, "tracefs") ||
> !strcmp(sb->s_type->name, "binderfs") ||
> + !strcmp(sb->s_type->name, "bpf") ||
> !strcmp(sb->s_type->name, "pstore"))
> sbsec->flags |= SE_SBGENFS;
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v3] security: selinux: allow per-file labeling for bpffs
2020-02-07 18:01 [PATCH v3] security: selinux: allow per-file labeling for bpffs Steven Moreland
2020-02-07 18:12 ` Stephen Smalley
@ 2020-02-12 3:07 ` Paul Moore
1 sibling, 0 replies; 3+ messages in thread
From: Paul Moore @ 2020-02-12 3:07 UTC (permalink / raw)
To: Steven Moreland
Cc: Stephen Smalley, Eric Paris, keescook, anton, ccross, tony.luck,
selinux, linux-kernel, kernel-team, Connor O'Brien
On Fri, Feb 7, 2020 at 1:02 PM Steven Moreland <smoreland@google.com> wrote:
>
> 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.
>
> 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(+)
Merged into selinux/next, thanks.
--
paul moore
www.paul-moore.com
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-02-12 3:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-07 18:01 [PATCH v3] security: selinux: allow per-file labeling for bpffs Steven Moreland
2020-02-07 18:12 ` Stephen Smalley
2020-02-12 3:07 ` Paul Moore
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).