diff options
author | Björn Töpel <bjorn.topel@intel.com> | 2018-05-02 07:01:22 -0400 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2018-05-03 18:55:23 -0400 |
commit | 68e8b849b221b37a78a110a0307717d45e3593a0 (patch) | |
tree | 04ca27d48c5f82bbcdfb2fa498297b8313aac82d /security | |
parent | 03f5781be2c7b7e728d724ac70ba10799cc710d7 (diff) |
net: initial AF_XDP skeleton
Buildable skeleton of AF_XDP without any functionality. Just what it
takes to register a new address family.
Signed-off-by: Björn Töpel <bjorn.topel@intel.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'security')
-rw-r--r-- | security/selinux/hooks.c | 4 | ||||
-rw-r--r-- | security/selinux/include/classmap.h | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index 4cafe6a19167..5c508d26b367 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c | |||
@@ -1471,7 +1471,9 @@ static inline u16 socket_type_to_security_class(int family, int type, int protoc | |||
1471 | return SECCLASS_QIPCRTR_SOCKET; | 1471 | return SECCLASS_QIPCRTR_SOCKET; |
1472 | case PF_SMC: | 1472 | case PF_SMC: |
1473 | return SECCLASS_SMC_SOCKET; | 1473 | return SECCLASS_SMC_SOCKET; |
1474 | #if PF_MAX > 44 | 1474 | case PF_XDP: |
1475 | return SECCLASS_XDP_SOCKET; | ||
1476 | #if PF_MAX > 45 | ||
1475 | #error New address family defined, please update this function. | 1477 | #error New address family defined, please update this function. |
1476 | #endif | 1478 | #endif |
1477 | } | 1479 | } |
diff --git a/security/selinux/include/classmap.h b/security/selinux/include/classmap.h index 7f0372426494..bd5fe0d3204a 100644 --- a/security/selinux/include/classmap.h +++ b/security/selinux/include/classmap.h | |||
@@ -240,9 +240,11 @@ struct security_class_mapping secclass_map[] = { | |||
240 | { "manage_subnet", NULL } }, | 240 | { "manage_subnet", NULL } }, |
241 | { "bpf", | 241 | { "bpf", |
242 | {"map_create", "map_read", "map_write", "prog_load", "prog_run"} }, | 242 | {"map_create", "map_read", "map_write", "prog_load", "prog_run"} }, |
243 | { "xdp_socket", | ||
244 | { COMMON_SOCK_PERMS, NULL } }, | ||
243 | { NULL } | 245 | { NULL } |
244 | }; | 246 | }; |
245 | 247 | ||
246 | #if PF_MAX > 44 | 248 | #if PF_MAX > 45 |
247 | #error New address family defined, please update secclass_map. | 249 | #error New address family defined, please update secclass_map. |
248 | #endif | 250 | #endif |