summaryrefslogtreecommitdiff
path: root/security/selinux/include/classmap.h
diff options
context:
space:
mode:
authorChenbo Feng <fengc@google.com>2017-10-18 13:00:25 -0700
committerDavid S. Miller <davem@davemloft.net>2017-10-20 13:32:59 +0100
commitec27c3568a34c7fe5fcf4ac0a354eda77687f7eb (patch)
treee37f2897f3c6228d26a9a15892e61ae63aa2e4fc /security/selinux/include/classmap.h
parentafdb09c720b62b8090584c11151d856df330e57d (diff)
selinux: bpf: Add selinux check for eBPF syscall operations
Implement the actual checks introduced to eBPF related syscalls. This implementation use the security field inside bpf object to store a sid that identify the bpf object. And when processes try to access the object, selinux will check if processes have the right privileges. The creation of eBPF object are also checked at the general bpf check hook and new cmd introduced to eBPF domain can also be checked there. Signed-off-by: Chenbo Feng <fengc@google.com> Acked-by: Alexei Starovoitov <ast@kernel.org> Reviewed-by: James Morris <james.l.morris@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'security/selinux/include/classmap.h')
-rw-r--r--security/selinux/include/classmap.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/security/selinux/include/classmap.h b/security/selinux/include/classmap.h
index 35ffb29a69cb..0a7023b5f000 100644
--- a/security/selinux/include/classmap.h
+++ b/security/selinux/include/classmap.h
@@ -237,6 +237,8 @@ struct security_class_mapping secclass_map[] = {
{ "access", NULL } },
{ "infiniband_endport",
{ "manage_subnet", NULL } },
+ { "bpf",
+ {"map_create", "map_read", "map_write", "prog_load", "prog_run"} },
{ NULL }
};