sys/linux: add descriptions for new tipc crypto APIs

Added the TIPC_NLA_NODE_KEY and TIPC_NLA_NODE_ID fields in the
socket_tipc_netlink.txt file. Created a new struct to hold the key.
Created two new descriptions for TIPC_NL_KEY_SET and TIPC_NL_KEY_FLUSH.
The related kernel commits can be seen in
https://git.kernel.org/linus/134bdac39766 and
https://git.kernel.org/linus/e1f32190cf7d.
This commit is contained in:
Jiaheng Hu 2020-06-15 17:57:10 +00:00 committed by Eric Biggers
parent c4293ba092
commit b1b22865fc
7 changed files with 54 additions and 0 deletions

View File

@ -93,6 +93,14 @@ tipc_name_table_query {
upbound int32be
}
type alg_aead_name_tipc string["gcm(aes)", TIPC_AEAD_ALG_NAME]
tipc_aead_key {
alg_name alg_aead_name_tipc
keylen len[key, int32]
key array[int8, TIPC_AEAD_KEYLEN_MIN:TIPC_AEAD_KEYLEN_MAX]
}
resource genl_tipc2_family_id[int16]
syz_genetlink_get_family_id$tipc2(name ptr[in, string["TIPCv2"]]) genl_tipc2_family_id
@ -120,6 +128,8 @@ sendmsg$TIPC_NL_MON_GET(fd sock_nl_generic, msg ptr[in, msghdr_nl_tipc2[TIPC_NL_
sendmsg$TIPC_NL_MON_PEER_GET(fd sock_nl_generic, msg ptr[in, msghdr_nl_tipc2[TIPC_NL_MON_PEER_GET]], f flags[send_flags])
sendmsg$TIPC_NL_PEER_REMOVE(fd sock_nl_generic, msg ptr[in, msghdr_nl_tipc2[TIPC_NL_PEER_REMOVE]], f flags[send_flags])
sendmsg$TIPC_NL_UDP_GET_REMOTEIP(fd sock_nl_generic, msg ptr[in, msghdr_nl_tipc2[TIPC_NL_UDP_GET_REMOTEIP]], f flags[send_flags])
sendmsg$TIPC_NL_KEY_SET(fd sock_nl_generic, msg ptr[in, msghdr_nl_tipc2[TIPC_NL_KEY_SET]], f flags[send_flags])
sendmsg$TIPC_NL_KEY_FLUSH(fd sock_nl_generic, msg ptr[in, msghdr_nl_tipc2[TIPC_NL_KEY_FLUSH]], f flags[send_flags])
tipc_nl_policy [
TIPC_NLA_BEARER nlnest[TIPC_NLA_BEARER, array[tipc_nl_bearer_policy]]
@ -170,6 +180,8 @@ tipc_nl_media_policy [
tipc_nl_node_policy [
TIPC_NLA_NODE_ADDR nlattr[TIPC_NLA_NODE_ADDR, int32]
TIPC_NLA_NODE_UP nlattr[TIPC_NLA_NODE_UP, void]
TIPC_NLA_NODE_ID nlattr[TIPC_NLA_NODE_ID, array[int8]]
TIPC_NLA_NODE_KEY nlattr[TIPC_NLA_NODE_KEY, tipc_aead_key]
] [varlen]
tipc_nl_net_policy [

View File

@ -1,4 +1,7 @@
# AUTOGENERATED FILE
TIPC_AEAD_ALG_NAME = 32
TIPC_AEAD_KEYLEN_MAX = 36
TIPC_AEAD_KEYLEN_MIN = 20
TIPC_CMD_DISABLE_BEARER = 16642
TIPC_CMD_ENABLE_BEARER = 16641
TIPC_CMD_GET_BEARER_NAMES = 3
@ -44,6 +47,8 @@ TIPC_NLA_NET_NODEID = 3
TIPC_NLA_NET_NODEID_W1 = 4
TIPC_NLA_NODE = 6
TIPC_NLA_NODE_ADDR = 1
TIPC_NLA_NODE_ID = 3
TIPC_NLA_NODE_KEY = 4
TIPC_NLA_NODE_UP = 2
TIPC_NLA_PROP_MTU = 4
TIPC_NLA_PROP_PRIO = 1
@ -65,6 +70,8 @@ TIPC_NL_BEARER_DISABLE = 2
TIPC_NL_BEARER_ENABLE = 3
TIPC_NL_BEARER_GET = 4
TIPC_NL_BEARER_SET = 5
TIPC_NL_KEY_FLUSH = 24
TIPC_NL_KEY_SET = 23
TIPC_NL_LINK_GET = 8
TIPC_NL_LINK_RESET_STATS = 10
TIPC_NL_LINK_SET = 9

View File

@ -1,4 +1,7 @@
# AUTOGENERATED FILE
TIPC_AEAD_ALG_NAME = 32
TIPC_AEAD_KEYLEN_MAX = 36
TIPC_AEAD_KEYLEN_MIN = 20
TIPC_CMD_DISABLE_BEARER = 16642
TIPC_CMD_ENABLE_BEARER = 16641
TIPC_CMD_GET_BEARER_NAMES = 3
@ -44,6 +47,8 @@ TIPC_NLA_NET_NODEID = 3
TIPC_NLA_NET_NODEID_W1 = 4
TIPC_NLA_NODE = 6
TIPC_NLA_NODE_ADDR = 1
TIPC_NLA_NODE_ID = 3
TIPC_NLA_NODE_KEY = 4
TIPC_NLA_NODE_UP = 2
TIPC_NLA_PROP_MTU = 4
TIPC_NLA_PROP_PRIO = 1
@ -65,6 +70,8 @@ TIPC_NL_BEARER_DISABLE = 2
TIPC_NL_BEARER_ENABLE = 3
TIPC_NL_BEARER_GET = 4
TIPC_NL_BEARER_SET = 5
TIPC_NL_KEY_FLUSH = 24
TIPC_NL_KEY_SET = 23
TIPC_NL_LINK_GET = 8
TIPC_NL_LINK_RESET_STATS = 10
TIPC_NL_LINK_SET = 9

View File

@ -1,4 +1,7 @@
# AUTOGENERATED FILE
TIPC_AEAD_ALG_NAME = 32
TIPC_AEAD_KEYLEN_MAX = 36
TIPC_AEAD_KEYLEN_MIN = 20
TIPC_CMD_DISABLE_BEARER = 16642
TIPC_CMD_ENABLE_BEARER = 16641
TIPC_CMD_GET_BEARER_NAMES = 3
@ -44,6 +47,8 @@ TIPC_NLA_NET_NODEID = 3
TIPC_NLA_NET_NODEID_W1 = 4
TIPC_NLA_NODE = 6
TIPC_NLA_NODE_ADDR = 1
TIPC_NLA_NODE_ID = 3
TIPC_NLA_NODE_KEY = 4
TIPC_NLA_NODE_UP = 2
TIPC_NLA_PROP_MTU = 4
TIPC_NLA_PROP_PRIO = 1
@ -65,6 +70,8 @@ TIPC_NL_BEARER_DISABLE = 2
TIPC_NL_BEARER_ENABLE = 3
TIPC_NL_BEARER_GET = 4
TIPC_NL_BEARER_SET = 5
TIPC_NL_KEY_FLUSH = 24
TIPC_NL_KEY_SET = 23
TIPC_NL_LINK_GET = 8
TIPC_NL_LINK_RESET_STATS = 10
TIPC_NL_LINK_SET = 9

View File

@ -1,4 +1,7 @@
# AUTOGENERATED FILE
TIPC_AEAD_ALG_NAME = 32
TIPC_AEAD_KEYLEN_MAX = 36
TIPC_AEAD_KEYLEN_MIN = 20
TIPC_CMD_DISABLE_BEARER = 16642
TIPC_CMD_ENABLE_BEARER = 16641
TIPC_CMD_GET_BEARER_NAMES = 3
@ -44,6 +47,8 @@ TIPC_NLA_NET_NODEID = 3
TIPC_NLA_NET_NODEID_W1 = 4
TIPC_NLA_NODE = 6
TIPC_NLA_NODE_ADDR = 1
TIPC_NLA_NODE_ID = 3
TIPC_NLA_NODE_KEY = 4
TIPC_NLA_NODE_UP = 2
TIPC_NLA_PROP_MTU = 4
TIPC_NLA_PROP_PRIO = 1
@ -65,6 +70,8 @@ TIPC_NL_BEARER_DISABLE = 2
TIPC_NL_BEARER_ENABLE = 3
TIPC_NL_BEARER_GET = 4
TIPC_NL_BEARER_SET = 5
TIPC_NL_KEY_FLUSH = 24
TIPC_NL_KEY_SET = 23
TIPC_NL_LINK_GET = 8
TIPC_NL_LINK_RESET_STATS = 10
TIPC_NL_LINK_SET = 9

View File

@ -1,4 +1,7 @@
# AUTOGENERATED FILE
TIPC_AEAD_ALG_NAME = 32
TIPC_AEAD_KEYLEN_MAX = 36
TIPC_AEAD_KEYLEN_MIN = 20
TIPC_CMD_DISABLE_BEARER = 16642
TIPC_CMD_ENABLE_BEARER = 16641
TIPC_CMD_GET_BEARER_NAMES = 3
@ -44,6 +47,8 @@ TIPC_NLA_NET_NODEID = 3
TIPC_NLA_NET_NODEID_W1 = 4
TIPC_NLA_NODE = 6
TIPC_NLA_NODE_ADDR = 1
TIPC_NLA_NODE_ID = 3
TIPC_NLA_NODE_KEY = 4
TIPC_NLA_NODE_UP = 2
TIPC_NLA_PROP_MTU = 4
TIPC_NLA_PROP_PRIO = 1
@ -65,6 +70,8 @@ TIPC_NL_BEARER_DISABLE = 2
TIPC_NL_BEARER_ENABLE = 3
TIPC_NL_BEARER_GET = 4
TIPC_NL_BEARER_SET = 5
TIPC_NL_KEY_FLUSH = 24
TIPC_NL_KEY_SET = 23
TIPC_NL_LINK_GET = 8
TIPC_NL_LINK_RESET_STATS = 10
TIPC_NL_LINK_SET = 9

View File

@ -1,4 +1,7 @@
# AUTOGENERATED FILE
TIPC_AEAD_ALG_NAME = 32
TIPC_AEAD_KEYLEN_MAX = 36
TIPC_AEAD_KEYLEN_MIN = 20
TIPC_CMD_DISABLE_BEARER = 16642
TIPC_CMD_ENABLE_BEARER = 16641
TIPC_CMD_GET_BEARER_NAMES = 3
@ -44,6 +47,8 @@ TIPC_NLA_NET_NODEID = 3
TIPC_NLA_NET_NODEID_W1 = 4
TIPC_NLA_NODE = 6
TIPC_NLA_NODE_ADDR = 1
TIPC_NLA_NODE_ID = 3
TIPC_NLA_NODE_KEY = 4
TIPC_NLA_NODE_UP = 2
TIPC_NLA_PROP_MTU = 4
TIPC_NLA_PROP_PRIO = 1
@ -65,6 +70,8 @@ TIPC_NL_BEARER_DISABLE = 2
TIPC_NL_BEARER_ENABLE = 3
TIPC_NL_BEARER_GET = 4
TIPC_NL_BEARER_SET = 5
TIPC_NL_KEY_FLUSH = 24
TIPC_NL_KEY_SET = 23
TIPC_NL_LINK_GET = 8
TIPC_NL_LINK_RESET_STATS = 10
TIPC_NL_LINK_SET = 9