Skip to content

Commit 77345e1

Browse files
cobrien7oobaboo
authored andcommitted
UPSTREAM: 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 <connoro@google.com> Signed-off-by: Steven Moreland <smoreland@google.com> Acked-by: Stephen Smalley <sds@tycho.nsa.gov> Signed-off-by: Paul Moore <paul@paul-moore.com> (cherry picked from commit 4ca54d3d3022ce27170b50e4bdecc3a42f05dbdc) [which is v5.6-rc1-10-g4ca54d3d3022 and thus already included in 5.10] Bug: 200440527 Change-Id: I8234b9047f29981b8140bd81bb2ff070b3b0b843 (cherry picked from commit d52ac987ad2ae16ff313d7fb6185bc412cb221a4)
1 parent de2fa0b commit 77345e1

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

security/selinux/hooks.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -823,7 +823,8 @@ static int selinux_set_mnt_opts(struct super_block *sb,
823823
if (!strcmp(sb->s_type->name, "debugfs") ||
824824
!strcmp(sb->s_type->name, "tracefs") ||
825825
!strcmp(sb->s_type->name, "sysfs") ||
826-
!strcmp(sb->s_type->name, "pstore"))
826+
!strcmp(sb->s_type->name, "pstore") ||
827+
!strcmp(sb->s_type->name, "bpf"))
827828
sbsec->flags |= SE_SBGENFS;
828829

829830
if (!sbsec->behavior) {

0 commit comments

Comments
 (0)