summaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2018-06-01 13:06:30 +1000
committerStephen Rothwell <sfr@canb.auug.org.au>2018-06-01 13:41:18 +1000
commitc4e27af67546cb602a625fa131945e6438c47029 (patch)
treec1d9470273e3cea3cc3dc59d6e77450a5ec6d07f /security
parent746e159a75a0ccf32ae7c00ee4529be78641efa8 (diff)
parent7bb8c9969d919517fc379cacebd8fa93704173db (diff)
Merge remote-tracking branch 'net-next/master'
Diffstat (limited to 'security')
-rw-r--r--security/selinux/hooks.c4
-rw-r--r--security/selinux/include/classmap.h4
2 files changed, 6 insertions, 2 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index 99c4675952f7..56a1294fa249 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -1470,7 +1470,9 @@ static inline u16 socket_type_to_security_class(int family, int type, int protoc
return SECCLASS_QIPCRTR_SOCKET;
case PF_SMC:
return SECCLASS_SMC_SOCKET;
-#if PF_MAX > 44
+ case PF_XDP:
+ return SECCLASS_XDP_SOCKET;
+#if PF_MAX > 45
#error New address family defined, please update this function.
#endif
}
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[] = {
{ "manage_subnet", NULL } },
{ "bpf",
{"map_create", "map_read", "map_write", "prog_load", "prog_run"} },
+ { "xdp_socket",
+ { COMMON_SOCK_PERMS, NULL } },
{ NULL }
};
-#if PF_MAX > 44
+#if PF_MAX > 45
#error New address family defined, please update secclass_map.
#endif