@@ -235,8 +235,9 @@ struct ucred {
#define AF_MCTP 45 /* Management component
* transport protocol
*/
+#define AF_TLSH 46 /* TLS handshake request */
-#define AF_MAX 46 /* For now.. */
+#define AF_MAX 47 /* For now.. */
/* Protocol families, same as address families. */
#define PF_UNSPEC AF_UNSPEC
@@ -287,6 +288,7 @@ struct ucred {
#define PF_SMC AF_SMC
#define PF_XDP AF_XDP
#define PF_MCTP AF_MCTP
+#define PF_TLSH AF_TLSH
#define PF_MAX AF_MAX
/* Maximum queue length specifiable by listen. */
@@ -229,7 +229,7 @@ static struct lock_class_key af_family_kern_slock_keys[AF_MAX];
x "AF_IEEE802154", x "AF_CAIF" , x "AF_ALG" , \
x "AF_NFC" , x "AF_VSOCK" , x "AF_KCM" , \
x "AF_QIPCRTR", x "AF_SMC" , x "AF_XDP" , \
- x "AF_MCTP" , \
+ x "AF_MCTP" , x "AF_TLSH" , \
x "AF_MAX"
static const char *const af_family_key_strings[AF_MAX+1] = {
@@ -214,6 +214,7 @@ static const char * const pf_family_names[] = {
[PF_SMC] = "PF_SMC",
[PF_XDP] = "PF_XDP",
[PF_MCTP] = "PF_MCTP",
+ [PF_TLSH] = "PF_TLSH",
};
/*
@@ -1257,7 +1257,9 @@ static inline u16 socket_type_to_security_class(int family, int type, int protoc
return SECCLASS_XDP_SOCKET;
case PF_MCTP:
return SECCLASS_MCTP_SOCKET;
-#if PF_MAX > 46
+ case PF_TLSH:
+ return SECCLASS_TLSH_SOCKET;
+#if PF_MAX > 47
#error New address family defined, please update this function.
#endif
}
@@ -237,6 +237,8 @@ const struct security_class_mapping secclass_map[] = {
{ COMMON_SOCK_PERMS, NULL } },
{ "smc_socket",
{ COMMON_SOCK_PERMS, NULL } },
+ { "tlsh_socket",
+ { COMMON_SOCK_PERMS, NULL } },
{ "infiniband_pkey",
{ "access", NULL } },
{ "infiniband_endport",
@@ -259,6 +261,6 @@ const struct security_class_mapping secclass_map[] = {
{ NULL }
};
-#if PF_MAX > 46
+#if PF_MAX > 47
#error New address family defined, please update secclass_map.
#endif
@@ -235,8 +235,9 @@ struct ucred {
#define AF_MCTP 45 /* Management component
* transport protocol
*/
+#define AF_TLSH 46 /* TLS handshake request */
-#define AF_MAX 46 /* For now.. */
+#define AF_MAX 47 /* For now.. */
/* Protocol families, same as address families. */
#define PF_UNSPEC AF_UNSPEC
@@ -287,6 +288,7 @@ struct ucred {
#define PF_SMC AF_SMC
#define PF_XDP AF_XDP
#define PF_MCTP AF_MCTP
+#define PF_TLSH AF_TLSH
#define PF_MAX AF_MAX
/* Maximum queue length specifiable by listen. */