Skip to content

Commit 4ca54d3

Browse files
cobrien7pcmoore
authored andcommitted
security: selinux: allow per-file labeling for bpffs
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 <[email protected]> Signed-off-by: Steven Moreland <[email protected]> Acked-by: Stephen Smalley <[email protected]> Signed-off-by: Paul Moore <[email protected]>
1 parent 89d4d7c commit 4ca54d3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

security/selinux/hooks.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -702,6 +702,7 @@ static int selinux_set_mnt_opts(struct super_block *sb,
702702
if (!strcmp(sb->s_type->name, "debugfs") ||
703703
!strcmp(sb->s_type->name, "tracefs") ||
704704
!strcmp(sb->s_type->name, "binderfs") ||
705+
!strcmp(sb->s_type->name, "bpf") ||
705706
!strcmp(sb->s_type->name, "pstore"))
706707
sbsec->flags |= SE_SBGENFS;
707708

0 commit comments

Comments
 (0)