github.com/google/syzkaller@v0.0.0-20240517125934-c0f1611a36d6/sys/linux/socket_netlink_generic_ethtool.txt (about) 1 # Copyright 2020 syzkaller project authors. All rights reserved. 2 # Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. 3 4 include <linux/net.h> 5 include <uapi/linux/netlink.h> 6 include <uapi/linux/genetlink.h> 7 include <uapi/linux/ethtool_netlink.h> 8 9 resource genl_ethtool_family_id[int16] 10 type msghdr_ethtool[CMD, POLICY] msghdr_netlink[netlink_msg_t[genl_ethtool_family_id, genlmsghdr_t[CMD], POLICY]] 11 12 syz_genetlink_get_family_id$ethtool(name ptr[in, string["ethtool"]], fd sock_nl_generic) genl_ethtool_family_id 13 14 sendmsg$ETHTOOL_MSG_STRSET_GET(fd sock_nl_generic, msg ptr[in, msghdr_ethtool[ETHTOOL_MSG_STRSET_GET, ethnl_strset_get_policy]], f flags[send_flags]) 15 sendmsg$ETHTOOL_MSG_LINKINFO_GET(fd sock_nl_generic, msg ptr[in, msghdr_ethtool[ETHTOOL_MSG_LINKINFO_GET, header_only_ethnl_policy[ETHTOOL_A_LINKINFO_HEADER]]], f flags[send_flags]) 16 sendmsg$ETHTOOL_MSG_LINKINFO_SET(fd sock_nl_generic, msg ptr[in, msghdr_ethtool[ETHTOOL_MSG_LINKINFO_SET, ethnl_linkinfo_set_policy]], f flags[send_flags]) 17 sendmsg$ETHTOOL_MSG_LINKMODES_GET(fd sock_nl_generic, msg ptr[in, msghdr_ethtool[ETHTOOL_MSG_LINKMODES_GET, header_only_ethnl_policy[ETHTOOL_A_LINKMODES_HEADER]]], f flags[send_flags]) 18 sendmsg$ETHTOOL_MSG_LINKMODES_SET(fd sock_nl_generic, msg ptr[in, msghdr_ethtool[ETHTOOL_MSG_LINKMODES_SET, ethnl_linkmodes_set_policy]], f flags[send_flags]) 19 sendmsg$ETHTOOL_MSG_LINKSTATE_GET(fd sock_nl_generic, msg ptr[in, msghdr_ethtool[ETHTOOL_MSG_LINKSTATE_GET, header_only_ethnl_policy[ETHTOOL_A_LINKSTATE_HEADER]]], f flags[send_flags]) 20 sendmsg$ETHTOOL_MSG_DEBUG_GET(fd sock_nl_generic, msg ptr[in, msghdr_ethtool[ETHTOOL_MSG_DEBUG_GET, header_only_ethnl_policy[ETHTOOL_A_DEBUG_HEADER]]], f flags[send_flags]) 21 sendmsg$ETHTOOL_MSG_DEBUG_SET(fd sock_nl_generic, msg ptr[in, msghdr_ethtool[ETHTOOL_MSG_DEBUG_SET, ethnl_debug_set_policy]], f flags[send_flags]) 22 sendmsg$ETHTOOL_MSG_WOL_GET(fd sock_nl_generic, msg ptr[in, msghdr_ethtool[ETHTOOL_MSG_WOL_GET, header_only_ethnl_policy[ETHTOOL_A_WOL_HEADER]]], f flags[send_flags]) 23 sendmsg$ETHTOOL_MSG_WOL_SET(fd sock_nl_generic, msg ptr[in, msghdr_ethtool[ETHTOOL_MSG_WOL_SET, ethnl_wol_set_policy]], f flags[send_flags]) 24 sendmsg$ETHTOOL_MSG_FEATURES_GET(fd sock_nl_generic, msg ptr[in, msghdr_ethtool[ETHTOOL_MSG_FEATURES_GET, header_only_ethnl_policy[ETHTOOL_A_FEATURES_HEADER]]], f flags[send_flags]) 25 sendmsg$ETHTOOL_MSG_FEATURES_SET(fd sock_nl_generic, msg ptr[in, msghdr_ethtool[ETHTOOL_MSG_FEATURES_SET, ethnl_features_set_policy]], f flags[send_flags]) 26 sendmsg$ETHTOOL_MSG_PRIVFLAGS_GET(fd sock_nl_generic, msg ptr[in, msghdr_ethtool[ETHTOOL_MSG_PRIVFLAGS_GET, header_only_ethnl_policy[ETHTOOL_A_PRIVFLAGS_HEADER]]], f flags[send_flags]) 27 sendmsg$ETHTOOL_MSG_PRIVFLAGS_SET(fd sock_nl_generic, msg ptr[in, msghdr_ethtool[ETHTOOL_MSG_PRIVFLAGS_SET, ethnl_privflags_set_policy]], f flags[send_flags]) 28 sendmsg$ETHTOOL_MSG_RINGS_GET(fd sock_nl_generic, msg ptr[in, msghdr_ethtool[ETHTOOL_MSG_RINGS_GET, header_only_ethnl_policy[ETHTOOL_A_RINGS_HEADER]]], f flags[send_flags]) 29 sendmsg$ETHTOOL_MSG_RINGS_SET(fd sock_nl_generic, msg ptr[in, msghdr_ethtool[ETHTOOL_MSG_RINGS_SET, ethnl_rings_set_policy]], f flags[send_flags]) 30 sendmsg$ETHTOOL_MSG_CHANNELS_GET(fd sock_nl_generic, msg ptr[in, msghdr_ethtool[ETHTOOL_MSG_CHANNELS_GET, header_only_ethnl_policy[ETHTOOL_A_CHANNELS_HEADER]]], f flags[send_flags]) 31 sendmsg$ETHTOOL_MSG_CHANNELS_SET(fd sock_nl_generic, msg ptr[in, msghdr_ethtool[ETHTOOL_MSG_CHANNELS_SET, ethnl_channels_set_policy]], f flags[send_flags]) 32 sendmsg$ETHTOOL_MSG_COALESCE_GET(fd sock_nl_generic, msg ptr[in, msghdr_ethtool[ETHTOOL_MSG_COALESCE_GET, header_only_ethnl_policy[ETHTOOL_A_COALESCE_HEADER]]], f flags[send_flags]) 33 sendmsg$ETHTOOL_MSG_COALESCE_SET(fd sock_nl_generic, msg ptr[in, msghdr_ethtool[ETHTOOL_MSG_COALESCE_SET, ethnl_coalesce_set_policy]], f flags[send_flags]) 34 sendmsg$ETHTOOL_MSG_PAUSE_GET(fd sock_nl_generic, msg ptr[in, msghdr_ethtool[ETHTOOL_MSG_PAUSE_GET, header_only_ethnl_policy[ETHTOOL_A_PAUSE_HEADER]]], f flags[send_flags]) 35 sendmsg$ETHTOOL_MSG_PAUSE_SET(fd sock_nl_generic, msg ptr[in, msghdr_ethtool[ETHTOOL_MSG_PAUSE_SET, ethnl_pause_set_policy]], f flags[send_flags]) 36 sendmsg$ETHTOOL_MSG_EEE_GET(fd sock_nl_generic, msg ptr[in, msghdr_ethtool[ETHTOOL_MSG_EEE_GET, header_only_ethnl_policy[ETHTOOL_A_EEE_HEADER]]], f flags[send_flags]) 37 sendmsg$ETHTOOL_MSG_EEE_SET(fd sock_nl_generic, msg ptr[in, msghdr_ethtool[ETHTOOL_MSG_EEE_SET, ethnl_eee_set_policy]], f flags[send_flags]) 38 sendmsg$ETHTOOL_MSG_TSINFO_GET(fd sock_nl_generic, msg ptr[in, msghdr_ethtool[ETHTOOL_MSG_TSINFO_GET, header_only_ethnl_policy[ETHTOOL_A_TSINFO_HEADER]]], f flags[send_flags]) 39 40 ethnl_header_policy [ 41 ETHTOOL_A_HEADER_DEV_INDEX nlattr[ETHTOOL_A_HEADER_DEV_INDEX, ifindex] 42 ETHTOOL_A_HEADER_DEV_NAME nlattr[ETHTOOL_A_HEADER_DEV_NAME, devname] 43 ETHTOOL_A_HEADER_FLAGS nlattr[ETHTOOL_A_HEADER_FLAGS, flags[ethnl_flags, int32]] 44 ] [varlen] 45 46 ethnl_flags = ETHTOOL_FLAG_COMPACT_BITSETS, ETHTOOL_FLAG_OMIT_REPLY 47 48 type header_only_ethnl_policy[HEADER_TYPE] [ 49 HEADER nlnest[HEADER_TYPE, array[ethnl_header_policy]] 50 ] [varlen] 51 52 bitset_policy [ 53 ETHTOOL_A_BITSET_NOMASK nlattr[ETHTOOL_A_BITSET_NOMASK, void] 54 ETHTOOL_A_BITSET_SIZE nlattr[ETHTOOL_A_BITSET_SIZE, int32] 55 ETHTOOL_A_BITSET_BITS nlnest[ETHTOOL_A_BITSET_BITS, array[nlnest[ETHTOOL_A_BITSET_BITS_BIT, array[bit_policy]]]] 56 ETHTOOL_A_BITSET_VALUE nlattr[ETHTOOL_A_BITSET_VALUE, array[int8]] 57 ETHTOOL_A_BITSET_MASK nlattr[ETHTOOL_A_BITSET_MASK, array[int8]] 58 ] [varlen] 59 60 bit_policy [ 61 ETHTOOL_A_BITSET_BIT_INDEX nlattr[ETHTOOL_A_BITSET_BIT_INDEX, int32] 62 ETHTOOL_A_BITSET_BIT_VALUE nlattr[ETHTOOL_A_BITSET_BIT_VALUE, void] 63 ETHTOOL_A_BITSET_BIT_NAME nlattr[ETHTOOL_A_BITSET_BIT_NAME, string] 64 ] [varlen] 65 66 ethnl_strset_get_policy [ 67 ETHTOOL_A_STRSET_HEADER nlnest[ETHTOOL_A_STRSET_HEADER, array[ethnl_header_policy]] 68 ETHTOOL_A_STRSET_STRINGSETS nlnest[ETHTOOL_A_STRSET_STRINGSETS, array[nlnest[ETHTOOL_A_STRINGSETS_STRINGSET, array[get_stringset_policy]]]] 69 ETHTOOL_A_STRSET_COUNTS_ONLY nlattr[ETHTOOL_A_STRSET_COUNTS_ONLY, void] 70 ] [varlen] 71 72 get_stringset_policy [ 73 ETHTOOL_A_STRINGSET_ID nlattr[ETHTOOL_A_STRINGSET_ID, flags[ethtool_stringset, int32]] 74 ] [varlen] 75 76 ethnl_linkinfo_set_policy [ 77 ETHTOOL_A_LINKINFO_HEADER nlnest[ETHTOOL_A_LINKINFO_HEADER, array[ethnl_header_policy]] 78 ETHTOOL_A_LINKINFO_PORT nlattr[ETHTOOL_A_LINKINFO_PORT, int8] 79 ETHTOOL_A_LINKINFO_PHYADDR nlattr[ETHTOOL_A_LINKINFO_PHYADDR, int8] 80 ETHTOOL_A_LINKINFO_TP_MDIX_CTRL nlattr[ETHTOOL_A_LINKINFO_TP_MDIX_CTRL, int8] 81 ] [varlen] 82 83 ethnl_linkmodes_set_policy [ 84 ETHTOOL_A_LINKMODES_HEADER nlnest[ETHTOOL_A_LINKMODES_HEADER, array[ethnl_header_policy]] 85 ETHTOOL_A_LINKMODES_AUTONEG nlattr[ETHTOOL_A_LINKMODES_AUTONEG, int8] 86 ETHTOOL_A_LINKMODES_DUPLEX nlattr[ETHTOOL_A_LINKMODES_DUPLEX, int8] 87 ETHTOOL_A_LINKMODES_SPEED nlattr[ETHTOOL_A_LINKMODES_SPEED, int32] 88 ETHTOOL_A_LINKMODES_OURS nlnest[ETHTOOL_A_LINKMODES_OURS, array[bitset_policy]] 89 ETHTOOL_A_LINKMODES_MASTER_SLAVE_CFG nlattr[ETHTOOL_A_LINKMODES_MASTER_SLAVE_CFG, flags[eth_master_slave_cfg, int8]] 90 ETHTOOL_A_LINKMODES_LANES nlattr[ETHTOOL_A_LINKMODES_LANES, flags[eth_link_lanes, int32]] 91 ] [varlen] 92 93 eth_master_slave_cfg = MASTER_SLAVE_CFG_MASTER_PREFERRED, MASTER_SLAVE_CFG_SLAVE_PREFERRED, MASTER_SLAVE_CFG_MASTER_FORCE, MASTER_SLAVE_CFG_SLAVE_FORCE 94 eth_link_lanes = 1, 2, 4, 8 95 96 ethnl_debug_set_policy [ 97 ETHTOOL_A_DEBUG_HEADER nlnest[ETHTOOL_A_DEBUG_HEADER, array[ethnl_header_policy]] 98 ETHTOOL_A_DEBUG_MSGMASK nlnest[ETHTOOL_A_DEBUG_MSGMASK, array[bitset_policy]] 99 ] [varlen] 100 101 ethnl_wol_set_policy [ 102 ETHTOOL_A_WOL_HEADER nlnest[ETHTOOL_A_WOL_HEADER, array[ethnl_header_policy]] 103 ETHTOOL_A_WOL_MODES nlnest[ETHTOOL_A_WOL_MODES, array[bitset_policy]] 104 ETHTOOL_A_WOL_SOPASS nlattr[ETHTOOL_A_WOL_SOPASS, array[int8]] 105 ] [varlen] 106 107 ethnl_features_set_policy [ 108 ETHTOOL_A_FEATURES_HEADER nlnest[ETHTOOL_A_FEATURES_HEADER, array[ethnl_header_policy]] 109 ETHTOOL_A_FEATURES_WANTED nlnest[ETHTOOL_A_FEATURES_WANTED, array[bitset_policy]] 110 ] [varlen] 111 112 ethnl_privflags_set_policy [ 113 ETHTOOL_A_PRIVFLAGS_HEADER nlnest[ETHTOOL_A_PRIVFLAGS_HEADER, array[ethnl_header_policy]] 114 ETHTOOL_A_PRIVFLAGS_FLAGS nlnest[ETHTOOL_A_PRIVFLAGS_FLAGS, array[bitset_policy]] 115 ] [varlen] 116 117 ethnl_rings_set_policy [ 118 ETHTOOL_A_RINGS_HEADER nlnest[ETHTOOL_A_RINGS_HEADER, array[ethnl_header_policy]] 119 ETHTOOL_A_RINGS_RX nlattr[ETHTOOL_A_RINGS_RX, int32] 120 ETHTOOL_A_RINGS_RX_MINI nlattr[ETHTOOL_A_RINGS_RX_MINI, int32] 121 ETHTOOL_A_RINGS_RX_JUMBO nlattr[ETHTOOL_A_RINGS_RX_JUMBO, int32] 122 ETHTOOL_A_RINGS_TX nlattr[ETHTOOL_A_RINGS_TX, int32] 123 ] [varlen] 124 125 ethnl_channels_set_policy [ 126 ETHTOOL_A_CHANNELS_HEADER nlnest[ETHTOOL_A_CHANNELS_HEADER, array[ethnl_header_policy]] 127 ETHTOOL_A_CHANNELS_RX_COUNT nlattr[ETHTOOL_A_CHANNELS_RX_COUNT, int32] 128 ETHTOOL_A_CHANNELS_TX_COUNT nlattr[ETHTOOL_A_CHANNELS_TX_COUNT, int32] 129 ETHTOOL_A_CHANNELS_OTHER_COUNT nlattr[ETHTOOL_A_CHANNELS_OTHER_COUNT, int32] 130 ETHTOOL_A_CHANNELS_COMBINED_COUNT nlattr[ETHTOOL_A_CHANNELS_COMBINED_COUNT, int32] 131 ] [varlen] 132 133 ethnl_coalesce_set_policy [ 134 ETHTOOL_A_COALESCE_HEADER nlnest[ETHTOOL_A_COALESCE_HEADER, array[ethnl_header_policy]] 135 ETHTOOL_A_COALESCE_RX_USECS nlattr[ETHTOOL_A_COALESCE_RX_USECS, int32] 136 ETHTOOL_A_COALESCE_RX_MAX_FRAMES nlattr[ETHTOOL_A_COALESCE_RX_MAX_FRAMES, int32] 137 ETHTOOL_A_COALESCE_RX_USECS_IRQ nlattr[ETHTOOL_A_COALESCE_RX_USECS_IRQ, int32] 138 ETHTOOL_A_COALESCE_RX_MAX_FRAMES_IRQ nlattr[ETHTOOL_A_COALESCE_RX_MAX_FRAMES_IRQ, int32] 139 ETHTOOL_A_COALESCE_TX_USECS nlattr[ETHTOOL_A_COALESCE_TX_USECS, int32] 140 ETHTOOL_A_COALESCE_TX_MAX_FRAMES nlattr[ETHTOOL_A_COALESCE_TX_MAX_FRAMES, int32] 141 ETHTOOL_A_COALESCE_TX_USECS_IRQ nlattr[ETHTOOL_A_COALESCE_TX_USECS_IRQ, int32] 142 ETHTOOL_A_COALESCE_TX_MAX_FRAMES_IRQ nlattr[ETHTOOL_A_COALESCE_TX_MAX_FRAMES_IRQ, int32] 143 ETHTOOL_A_COALESCE_STATS_BLOCK_USECS nlattr[ETHTOOL_A_COALESCE_STATS_BLOCK_USECS, int32] 144 ETHTOOL_A_COALESCE_USE_ADAPTIVE_RX nlattr[ETHTOOL_A_COALESCE_USE_ADAPTIVE_RX, bool8] 145 ETHTOOL_A_COALESCE_USE_ADAPTIVE_TX nlattr[ETHTOOL_A_COALESCE_USE_ADAPTIVE_TX, bool8] 146 ETHTOOL_A_COALESCE_PKT_RATE_LOW nlattr[ETHTOOL_A_COALESCE_PKT_RATE_LOW, int32] 147 ETHTOOL_A_COALESCE_RX_USECS_LOW nlattr[ETHTOOL_A_COALESCE_RX_USECS_LOW, int32] 148 ETHTOOL_A_COALESCE_RX_MAX_FRAMES_LOW nlattr[ETHTOOL_A_COALESCE_RX_MAX_FRAMES_LOW, int32] 149 ETHTOOL_A_COALESCE_TX_USECS_LOW nlattr[ETHTOOL_A_COALESCE_TX_USECS_LOW, int32] 150 ETHTOOL_A_COALESCE_TX_MAX_FRAMES_LOW nlattr[ETHTOOL_A_COALESCE_TX_MAX_FRAMES_LOW, int32] 151 ETHTOOL_A_COALESCE_PKT_RATE_HIGH nlattr[ETHTOOL_A_COALESCE_PKT_RATE_HIGH, int32] 152 ETHTOOL_A_COALESCE_RX_USECS_HIGH nlattr[ETHTOOL_A_COALESCE_RX_USECS_HIGH, int32] 153 ETHTOOL_A_COALESCE_RX_MAX_FRAMES_HIGH nlattr[ETHTOOL_A_COALESCE_RX_MAX_FRAMES_HIGH, int32] 154 ETHTOOL_A_COALESCE_TX_USECS_HIGH nlattr[ETHTOOL_A_COALESCE_TX_USECS_HIGH, int32] 155 ETHTOOL_A_COALESCE_TX_MAX_FRAMES_HIGH nlattr[ETHTOOL_A_COALESCE_TX_MAX_FRAMES_HIGH, int32] 156 ETHTOOL_A_COALESCE_RATE_SAMPLE_INTERVAL nlattr[ETHTOOL_A_COALESCE_RATE_SAMPLE_INTERVAL, int32] 157 ETHTOOL_A_COALESCE_USE_CQE_MODE_TX nlattr[ETHTOOL_A_COALESCE_USE_CQE_MODE_TX, bool8] 158 ETHTOOL_A_COALESCE_USE_CQE_MODE_RX nlattr[ETHTOOL_A_COALESCE_USE_CQE_MODE_RX, bool8] 159 ] [varlen] 160 161 ethnl_pause_set_policy [ 162 ETHTOOL_A_PAUSE_HEADER nlnest[ETHTOOL_A_PAUSE_HEADER, array[ethnl_header_policy]] 163 ETHTOOL_A_PAUSE_AUTONEG nlattr[ETHTOOL_A_PAUSE_AUTONEG, bool8] 164 ETHTOOL_A_PAUSE_RX nlattr[ETHTOOL_A_PAUSE_RX, bool8] 165 ETHTOOL_A_PAUSE_TX nlattr[ETHTOOL_A_PAUSE_TX, bool8] 166 ] [varlen] 167 168 ethnl_eee_set_policy [ 169 ETHTOOL_A_EEE_HEADER nlnest[ETHTOOL_A_EEE_HEADER, array[ethnl_header_policy]] 170 ETHTOOL_A_EEE_MODES_OURS nlnest[ETHTOOL_A_EEE_MODES_OURS, array[bitset_policy]] 171 ETHTOOL_A_EEE_ENABLED nlattr[ETHTOOL_A_EEE_ENABLED, bool8] 172 ETHTOOL_A_EEE_TX_LPI_ENABLED nlattr[ETHTOOL_A_EEE_TX_LPI_ENABLED, bool8] 173 ETHTOOL_A_EEE_TX_LPI_TIMER nlattr[ETHTOOL_A_EEE_TX_LPI_TIMER, int32] 174 ] [varlen]