sys/linux: fix 2 netlink data layout bugs

1. Turns out that NLA_F_NESTED is actually used and checked
(nla_parse_nested checks it, while nla_parse_nested_deprecated does not).
Similarly, ipset extensively checks NLA_F_NET_BYTEORDER.
So we need these bits.

2. nla_len must not account for the trailing alighnment padding.
This means we set wrong len for payloads that are not multiple of 4
(int8/int16/strings/arrays/some structs/etc).
This commit is contained in:
Dmitry Vyukov 2020-01-07 07:27:40 +01:00
parent d2bde102ff
commit a0f466387d
24 changed files with 20812 additions and 10550 deletions

20
executor/defs.h generated
View File

@ -70,7 +70,7 @@
#if GOARCH_386
#define GOARCH "386"
#define SYZ_REVISION "0d4392ec4bbaac733d89638f89c5f5e4c3b6d173"
#define SYZ_REVISION "62a9b2b050136e45a0be599b6deb36fe3e5ff8dd"
#define SYZ_EXECUTOR_USES_FORK_SERVER 1
#define SYZ_EXECUTOR_USES_SHMEM 1
#define SYZ_PAGE_SIZE 4096
@ -80,7 +80,7 @@
#if GOARCH_amd64
#define GOARCH "amd64"
#define SYZ_REVISION "eb04764429761ca53fcd5fb6aabeb588d7179d24"
#define SYZ_REVISION "87856dd1c58eebc8bbc562cc5d43e45e757a20c1"
#define SYZ_EXECUTOR_USES_FORK_SERVER 1
#define SYZ_EXECUTOR_USES_SHMEM 1
#define SYZ_PAGE_SIZE 4096
@ -90,7 +90,7 @@
#if GOARCH_arm
#define GOARCH "arm"
#define SYZ_REVISION "c6c8b3b4764946adce979969e9a8525843642a3a"
#define SYZ_REVISION "151f6dbd7107c82da4d21fb1f90d01d9f176bd95"
#define SYZ_EXECUTOR_USES_FORK_SERVER 1
#define SYZ_EXECUTOR_USES_SHMEM 1
#define SYZ_PAGE_SIZE 4096
@ -100,7 +100,7 @@
#if GOARCH_arm64
#define GOARCH "arm64"
#define SYZ_REVISION "9a88f89d9203cd30cc87f029af17698109aee181"
#define SYZ_REVISION "d53cb725ca46bc3ef27244418817a70d6bfa0df3"
#define SYZ_EXECUTOR_USES_FORK_SERVER 1
#define SYZ_EXECUTOR_USES_SHMEM 1
#define SYZ_PAGE_SIZE 4096
@ -110,7 +110,7 @@
#if GOARCH_mips64le
#define GOARCH "mips64le"
#define SYZ_REVISION "a2d4e66989dfea9cb51366da4ef24d8aa44ee369"
#define SYZ_REVISION "897488fd3b29321f29ad189f15995faf34933e99"
#define SYZ_EXECUTOR_USES_FORK_SERVER 1
#define SYZ_EXECUTOR_USES_SHMEM 1
#define SYZ_PAGE_SIZE 4096
@ -120,7 +120,7 @@
#if GOARCH_ppc64le
#define GOARCH "ppc64le"
#define SYZ_REVISION "0833234cf27edc25e52ccb55a897cc4f1309885a"
#define SYZ_REVISION "eeb40dd70858355f0879b110e4697fb872c5229c"
#define SYZ_EXECUTOR_USES_FORK_SERVER 1
#define SYZ_EXECUTOR_USES_SHMEM 1
#define SYZ_PAGE_SIZE 4096
@ -165,7 +165,7 @@
#if GOARCH_32_fork_shmem
#define GOARCH "32_fork_shmem"
#define SYZ_REVISION "65b45f9333f75578cb84103da5f8f8cac77e1cb2"
#define SYZ_REVISION "2efcbbbee05d0f1b1815d450e261aa68e6ea3243"
#define SYZ_EXECUTOR_USES_FORK_SERVER 1
#define SYZ_EXECUTOR_USES_SHMEM 1
#define SYZ_PAGE_SIZE 4096
@ -175,7 +175,7 @@
#if GOARCH_32_shmem
#define GOARCH "32_shmem"
#define SYZ_REVISION "b8778b191df966880a432c9570ed01febb5fd600"
#define SYZ_REVISION "4d149786a888a3df191cfc3bb5504cdbe4303b99"
#define SYZ_EXECUTOR_USES_FORK_SERVER 0
#define SYZ_EXECUTOR_USES_SHMEM 1
#define SYZ_PAGE_SIZE 8192
@ -185,7 +185,7 @@
#if GOARCH_64
#define GOARCH "64"
#define SYZ_REVISION "c961c6f32ad948f6dfbd83c8dc123a55bd261814"
#define SYZ_REVISION "70ed4d89f5c1baa13983ab0123304d124539e73f"
#define SYZ_EXECUTOR_USES_FORK_SERVER 0
#define SYZ_EXECUTOR_USES_SHMEM 0
#define SYZ_PAGE_SIZE 4096
@ -195,7 +195,7 @@
#if GOARCH_64_fork
#define GOARCH "64_fork"
#define SYZ_REVISION "eab9bc08c8b2f077a545740bfbb781687ba5221b"
#define SYZ_REVISION "b63e26f1ec94318b884578dc3115d82aa46c96dd"
#define SYZ_EXECUTOR_USES_FORK_SERVER 1
#define SYZ_EXECUTOR_USES_SHMEM 0
#define SYZ_PAGE_SIZE 8192

5140
sys/linux/gen/386.go generated

File diff suppressed because one or more lines are too long

5140
sys/linux/gen/amd64.go generated

File diff suppressed because one or more lines are too long

5140
sys/linux/gen/arm.go generated

File diff suppressed because one or more lines are too long

5140
sys/linux/gen/arm64.go generated

File diff suppressed because one or more lines are too long

5140
sys/linux/gen/mips64le.go generated

File diff suppressed because one or more lines are too long

5140
sys/linux/gen/ppc64le.go generated

File diff suppressed because one or more lines are too long

View File

@ -92,24 +92,37 @@ type netlink_msg_t[TYPE, PAYLOAD, ATTRS] {
type netlink_msg[TYPE, PAYLOAD, ATTRS] netlink_msg_t[const[TYPE, int16], PAYLOAD, ATTRS]
type nlattr_t[TYPE, PAYLOAD] {
nla_len len[parent, int16]
nla_len offsetof[size, int16]
nla_type TYPE
payload PAYLOAD
size void
} [packed, align_4]
type nlattr_tt[TYPE, NETORDER, NESTED, PAYLOAD] {
nla_len offsetof[size, int16]
nla_type TYPE
NLA_F_NET_BYTEORDER const[NETORDER, int16:1]
NLA_F_NESTED const[NESTED, int16:1]
payload PAYLOAD
size void
} [packed, align_4]
# NL80211 has 150 attributes.
type nlattr_anytype[PAYLOAD] nlattr_t[int16[0:150], PAYLOAD]
type nlattr[TYPE, PAYLOAD] nlattr_t[const[TYPE, int16], PAYLOAD]
# nlattr with NLA_F_NESTED set.
type nlnest[TYPE, PAYLOAD] nlattr_tt[const[TYPE, int16:14], 0, 1, PAYLOAD]
# nlattr with NLA_F_NET_BYTEORDER set (unused for now).
# type nlnetw[TYPE, PAYLOAD] nlattr_tt[const[TYPE, int16:14], 1, 0, PAYLOAD]
nl_generic_attr [
generic array[int8]
typed nlattr_anytype[nl_generic_attr_data]
nested nlattr_anytype[array[nl_generic_attr_nonested]]
# NL80211 has 150 attributes.
typed nlattr_tt[int16:14[0:150], 0, 0, nl_generic_attr_data]
nested nlattr_tt[int16:14[0:150], 0, 1, array[nl_generic_attr_nonested]]
] [varlen]
nl_generic_attr_nonested [
generic array[int8]
typed nlattr_anytype[nl_generic_attr_data]
typed nlattr_tt[int16:14[0:150], 0, 0, nl_generic_attr_data]
] [varlen]
nl_generic_attr_data [

View File

@ -6,6 +6,7 @@
include <linux/net.h>
include <linux/netdevice.h>
include <uapi/linux/if.h>
include <uapi/linux/ip.h>
include <uapi/linux/if_link.h>
include <uapi/linux/if_addr.h>
include <uapi/linux/if_vlan.h>
@ -173,7 +174,7 @@ ifla_policy [
IFLA_VFINFO_LIST nlattr[IFLA_VFINFO_LIST, array[nlattr[IFLA_VF_INFO, array[ifla_vf_policy]]]]
IFLA_VF_PORTS nlattr[IFLA_VF_PORTS, array[nlattr[IFLA_VF_PORT, array[ifla_port_policy]]]]
IFLA_PORT_SELF nlattr[IFLA_PORT_SELF, array[ifla_port_policy]]
IFLA_AF_SPEC nlattr[IFLA_AF_SPEC, array[nlattr_t[flags[rtnl_af, int16], void]]]
IFLA_AF_SPEC nlnest[IFLA_AF_SPEC, array[ifla_af_spec_policy]]
IFLA_EXT_MASK nlattr[IFLA_EXT_MASK, int32]
IFLA_PROMISCUITY nlattr[IFLA_PROMISCUITY, int32]
IFLA_NUM_TX_QUEUES nlattr[IFLA_NUM_TX_QUEUES, int32]
@ -194,6 +195,18 @@ ifla_policy [
IFLA_GSO_MAX_SIZE nlattr[IFLA_GSO_MAX_SIZE, int32[0:GSO_MAX_SIZE]]
] [varlen]
ifla_af_spec_policy [
AF_INET nlnest[AF_INET, nlnest[IFLA_INET_CONF, array[nlattr_tt[int16:14[0:IPV4_DEVCONF_MAX], 0, 0, int32]]]]
AF_INET6 nlnest[AF_INET6, array[inet6_af_policy]]
AF_BRIDGE nlattr[AF_BRIDGE, void]
AF_MPLS nlattr[AF_MPLS, void]
] [varlen]
inet6_af_policy [
IFLA_INET6_ADDR_GEN_MODE nlattr[IFLA_INET6_ADDR_GEN_MODE, int8]
IFLA_INET6_TOKEN nlattr[IFLA_INET6_TOKEN, ipv6_addr]
] [varlen]
type ifla_info_policy_t[TYPE, DATA_TYPE, DATA] {
IFLA_INFO_KIND nlattr[IFLA_INFO_KIND, string[TYPE]]
IFLA_INFO_DATA nlattr[DATA_TYPE, DATA]

View File

@ -219,6 +219,9 @@ IFLA_HSR_VERSION = 6
IFLA_IFALIAS = 20
IFLA_IFNAME = 3
IFLA_IF_NETNSID = 46
IFLA_INET6_ADDR_GEN_MODE = 8
IFLA_INET6_TOKEN = 7
IFLA_INET_CONF = 1
IFLA_INFO_DATA = 2
IFLA_INFO_KIND = 1
IFLA_INFO_SLAVE_DATA = 5
@ -322,6 +325,7 @@ IFLA_XFRM_IF_ID = 2
IFLA_XFRM_LINK = 1
IPPROTO_IPIP = 4
IPPROTO_IPV6 = 41
IPV4_DEVCONF_MAX = 32
IPVLAN_F_PRIVATE = 1
IPVLAN_F_VEPA = 2
IPVLAN_MODE_L2 = 0

View File

@ -219,6 +219,9 @@ IFLA_HSR_VERSION = 6
IFLA_IFALIAS = 20
IFLA_IFNAME = 3
IFLA_IF_NETNSID = 46
IFLA_INET6_ADDR_GEN_MODE = 8
IFLA_INET6_TOKEN = 7
IFLA_INET_CONF = 1
IFLA_INFO_DATA = 2
IFLA_INFO_KIND = 1
IFLA_INFO_SLAVE_DATA = 5
@ -322,6 +325,7 @@ IFLA_XFRM_IF_ID = 2
IFLA_XFRM_LINK = 1
IPPROTO_IPIP = 4
IPPROTO_IPV6 = 41
IPV4_DEVCONF_MAX = 32
IPVLAN_F_PRIVATE = 1
IPVLAN_F_VEPA = 2
IPVLAN_MODE_L2 = 0

View File

@ -219,6 +219,9 @@ IFLA_HSR_VERSION = 6
IFLA_IFALIAS = 20
IFLA_IFNAME = 3
IFLA_IF_NETNSID = 46
IFLA_INET6_ADDR_GEN_MODE = 8
IFLA_INET6_TOKEN = 7
IFLA_INET_CONF = 1
IFLA_INFO_DATA = 2
IFLA_INFO_KIND = 1
IFLA_INFO_SLAVE_DATA = 5
@ -322,6 +325,7 @@ IFLA_XFRM_IF_ID = 2
IFLA_XFRM_LINK = 1
IPPROTO_IPIP = 4
IPPROTO_IPV6 = 41
IPV4_DEVCONF_MAX = 32
IPVLAN_F_PRIVATE = 1
IPVLAN_F_VEPA = 2
IPVLAN_MODE_L2 = 0

View File

@ -219,6 +219,9 @@ IFLA_HSR_VERSION = 6
IFLA_IFALIAS = 20
IFLA_IFNAME = 3
IFLA_IF_NETNSID = 46
IFLA_INET6_ADDR_GEN_MODE = 8
IFLA_INET6_TOKEN = 7
IFLA_INET_CONF = 1
IFLA_INFO_DATA = 2
IFLA_INFO_KIND = 1
IFLA_INFO_SLAVE_DATA = 5
@ -322,6 +325,7 @@ IFLA_XFRM_IF_ID = 2
IFLA_XFRM_LINK = 1
IPPROTO_IPIP = 4
IPPROTO_IPV6 = 41
IPV4_DEVCONF_MAX = 32
IPVLAN_F_PRIVATE = 1
IPVLAN_F_VEPA = 2
IPVLAN_MODE_L2 = 0

View File

@ -219,6 +219,9 @@ IFLA_HSR_VERSION = 6
IFLA_IFALIAS = 20
IFLA_IFNAME = 3
IFLA_IF_NETNSID = 46
IFLA_INET6_ADDR_GEN_MODE = 8
IFLA_INET6_TOKEN = 7
IFLA_INET_CONF = 1
IFLA_INFO_DATA = 2
IFLA_INFO_KIND = 1
IFLA_INFO_SLAVE_DATA = 5
@ -322,6 +325,7 @@ IFLA_XFRM_IF_ID = 2
IFLA_XFRM_LINK = 1
IPPROTO_IPIP = 4
IPPROTO_IPV6 = 41
IPV4_DEVCONF_MAX = 32
IPVLAN_F_PRIVATE = 1
IPVLAN_F_VEPA = 2
IPVLAN_MODE_L2 = 0

View File

@ -219,6 +219,9 @@ IFLA_HSR_VERSION = 6
IFLA_IFALIAS = 20
IFLA_IFNAME = 3
IFLA_IF_NETNSID = 46
IFLA_INET6_ADDR_GEN_MODE = 8
IFLA_INET6_TOKEN = 7
IFLA_INET_CONF = 1
IFLA_INFO_DATA = 2
IFLA_INFO_KIND = 1
IFLA_INFO_SLAVE_DATA = 5
@ -322,6 +325,7 @@ IFLA_XFRM_IF_ID = 2
IFLA_XFRM_LINK = 1
IPPROTO_IPIP = 4
IPPROTO_IPV6 = 41
IPV4_DEVCONF_MAX = 32
IPVLAN_F_PRIVATE = 1
IPVLAN_F_VEPA = 2
IPVLAN_MODE_L2 = 0

View File

@ -901,32 +901,34 @@ tc_u32_mark {
}
# ------------------------------ tc action ------------------------------
type nlattr_tca_actions[PAYLOAD] nlattr_tt[int16:14[0:TCA_ACT_MAX_PRIO], 0, 0, PAYLOAD]
tca_actions [
m_bpf nlattr_t[int32[0:TCA_ACT_MAX_PRIO], tca_actions_t["bpf", array[m_bpf_options]]]
m_connmark nlattr_t[int32[0:TCA_ACT_MAX_PRIO], tca_actions_t["connmark", m_connmark_options]]
m_csum nlattr_t[int32[0:TCA_ACT_MAX_PRIO], tca_actions_t["csum", m_csum_options]]
m_ct nlattr_t[int32[0:TCA_ACT_MAX_PRIO], tca_actions_t["ct", m_ct_options]]
m_ctinfo nlattr_t[int32[0:TCA_ACT_MAX_PRIO], tca_actions_t["ctinfo", m_ctinfo_options]]
m_gact nlattr_t[int32[0:TCA_ACT_MAX_PRIO], tca_actions_t["gact", array[m_gact_options]]]
m_ife nlattr_t[int32[0:TCA_ACT_MAX_PRIO], tca_actions_t["ife", array[m_ife_options]]]
m_ipt nlattr_t[int32[0:TCA_ACT_MAX_PRIO], tca_actions_t["ipt", array[m_ipt_options]]]
m_xt nlattr_t[int32[0:TCA_ACT_MAX_PRIO], tca_actions_t["xt", array[m_xt_options]]]
m_mirred nlattr_t[int32[0:TCA_ACT_MAX_PRIO], tca_actions_t["mirred", m_mirred_options]]
m_mpls nlattr_t[int32[0:TCA_ACT_MAX_PRIO], tca_actions_t["mpls", m_mpls_options]]
m_nat nlattr_t[int32[0:TCA_ACT_MAX_PRIO], tca_actions_t["nat", m_nat_options]]
m_pedit nlattr_t[int32[0:TCA_ACT_MAX_PRIO], tca_actions_t["pedit", array[m_pedit_options]]]
m_police nlattr_t[int32[0:TCA_ACT_MAX_PRIO], tca_actions_t["police", array[m_police_options]]]
m_sample nlattr_t[int32[0:TCA_ACT_MAX_PRIO], tca_actions_t["sample", array[m_sample_options]]]
m_simple nlattr_t[int32[0:TCA_ACT_MAX_PRIO], tca_actions_t["simple", array[m_simple_options]]]
m_skbedit nlattr_t[int32[0:TCA_ACT_MAX_PRIO], tca_actions_t["skbedit", array[m_skbedit_options]]]
m_skbmod nlattr_t[int32[0:TCA_ACT_MAX_PRIO], tca_actions_t["skbmod", array[m_skbmod_options]]]
m_tunnel_key nlattr_t[int32[0:TCA_ACT_MAX_PRIO], tca_actions_t["tunnel_key", array[m_tunnel_key_options]]]
m_vlan nlattr_t[int32[0:TCA_ACT_MAX_PRIO], tca_actions_t["vlan", array[m_vlan_options]]]
m_bpf nlattr_tca_actions[tca_actions_t["bpf", m_bpf_options]]
m_connmark nlattr_tca_actions[tca_actions_t["connmark", m_connmark_options]]
m_csum nlattr_tca_actions[tca_actions_t["csum", m_csum_options]]
m_ct nlattr_tca_actions[tca_actions_t["ct", m_ct_options]]
m_ctinfo nlattr_tca_actions[tca_actions_t["ctinfo", ctinfo_policy]]
m_gact nlattr_tca_actions[tca_actions_t["gact", m_gact_options]]
m_ife nlattr_tca_actions[tca_actions_t["ife", m_ife_options]]
m_ipt nlattr_tca_actions[tca_actions_t["ipt", m_ipt_options]]
m_xt nlattr_tca_actions[tca_actions_t["xt", m_xt_options]]
m_mirred nlattr_tca_actions[tca_actions_t["mirred", m_mirred_options]]
m_mpls nlattr_tca_actions[tca_actions_t["mpls", mpls_policy]]
m_nat nlattr_tca_actions[tca_actions_t["nat", m_nat_options]]
m_pedit nlattr_tca_actions[tca_actions_t["pedit", m_pedit_options]]
m_police nlattr_tca_actions[tca_actions_t["police", m_police_options]]
m_sample nlattr_tca_actions[tca_actions_t["sample", m_sample_options]]
m_simple nlattr_tca_actions[tca_actions_t["simple", m_simple_options]]
m_skbedit nlattr_tca_actions[tca_actions_t["skbedit", m_skbedit_options]]
m_skbmod nlattr_tca_actions[tca_actions_t["skbmod", m_skbmod_options]]
m_tunnel_key nlattr_tca_actions[tca_actions_t["tunnel_key", m_tunnel_key_options]]
m_vlan nlattr_tca_actions[tca_actions_t["vlan", m_vlan_options]]
] [varlen]
type tca_actions_t[NAME, VALUES] {
TCA_ACT_KIND nlattr[TCA_ACT_KIND, string[NAME]]
TCA_ACT_OPTIONS nlattr[TCA_ACT_OPTIONS, VALUES]
TCA_ACT_OPTIONS nlnest[TCA_ACT_OPTIONS, array[VALUES]]
TCA_ACT_COOKIE nlattr[TCA_ACT_COOKIE, array[int8]]
} [packed, align_4]
@ -962,13 +964,13 @@ m_ct_options [
TCA_CT_NAT_PORT_MAX nlattr[TCA_CT_NAT_PORT_MAX, sock_port]
] [varlen]
m_ctinfo_options [
ctinfo_policy [
TCA_CTINFO_ACT nlattr[TCA_CTINFO_ACT, tc_gen]
TCA_CTINFO_ZONE nlattr[TCA_CTINFO_ZONE, int16]
TCA_CTINFO_PARMS_DSCP_MASK nlattr[TCA_CTINFO_PARMS_DSCP_MASK, int32]
TCA_CTINFO_PARMS_DSCP_STATEMASK nlattr[TCA_CTINFO_PARMS_DSCP_STATEMASK, int32]
TCA_CTINFO_PARMS_CPMARK_MASK nlattr[TCA_CTINFO_PARMS_CPMARK_MASK, int32]
]
] [varlen]
m_gact_options [
TCA_GACT_PARMS nlattr[TCA_GACT_PARMS, tc_gen]
@ -1016,7 +1018,7 @@ m_mirred_options [
TCA_MIRRED_PARMS nlattr[TCA_MIRRED_PARMS, tc_mirred]
] [varlen]
m_mpls_options [
mpls_policy [
TCA_MPLS_PARMS nlattr[TCA_MPLS_PARMS, tc_mpls]
TCA_MPLS_PROTO nlattr[TCA_MPLS_PROTO, flags[ether_types, int16be]]
TCA_MPLS_LABEL nlattr[TCA_MPLS_LABEL, int32[0:0xfffff]]
@ -1098,7 +1100,7 @@ m_vlan_options [
] [varlen]
action_gd_policy [
TCA_ACT_TAB nlattr[TCA_ACT_TAB, array[nlattr_t[int32[0:TCA_ACT_MAX_PRIO], tca_actions_kind_index]]]
TCA_ACT_TAB nlattr[TCA_ACT_TAB, array[nlattr_tca_actions[tca_actions_kind_index]]]
] [varlen]
tca_actions_kind_index [
@ -1258,15 +1260,17 @@ tcf_ematch_tree_hdr {
progid const[TCF_EM_PROG_TC, int16]
}
type nlattr_tca_ematch_tree_list[PAYLOAD] nlattr_tt[int16:14[1:3], 0, 0, PAYLOAD]
tca_ematch_tree_list [
TCF_EM_CONTAINER nlattr_t[int32, tcf_ematch_hdr_t[TCF_EM_CONTAINER, array[int8]]]
TCF_EM_CMP nlattr_t[int32, tcf_ematch_hdr_t[TCF_EM_CMP, tcf_em_cmp]]
TCF_EM_NBYTE nlattr_t[int32, tcf_ematch_hdr_t[TCF_EM_NBYTE, tcf_em_nbyte]]
TCF_EM_U32 nlattr_t[int32, tcf_ematch_hdr_t[TCF_EM_U32, tc_u32_key]]
TCF_EM_META nlattr_t[int32, tcf_ematch_hdr_t[TCF_EM_META, array[tcf_em_meta_policy]]]
TCF_EM_CANID nlattr_t[int32, tcf_ematch_hdr_t[TCF_EM_CANID, can_filter]]
TCF_EM_IPSET nlattr_t[int32, tcf_ematch_hdr_t[TCF_EM_IPSET, xt_set_info]]
TCF_EM_IPT nlattr_t[int32, tcf_ematch_hdr_t[TCF_EM_IPT, array[tcf_em_ipt_policy]]]
TCF_EM_CONTAINER nlattr_tca_ematch_tree_list[tcf_ematch_hdr_t[TCF_EM_CONTAINER, array[int8]]]
TCF_EM_CMP nlattr_tca_ematch_tree_list[tcf_ematch_hdr_t[TCF_EM_CMP, tcf_em_cmp]]
TCF_EM_NBYTE nlattr_tca_ematch_tree_list[tcf_ematch_hdr_t[TCF_EM_NBYTE, tcf_em_nbyte]]
TCF_EM_U32 nlattr_tca_ematch_tree_list[tcf_ematch_hdr_t[TCF_EM_U32, tc_u32_key]]
TCF_EM_META nlattr_tca_ematch_tree_list[tcf_ematch_hdr_t[TCF_EM_META, array[tcf_em_meta_policy]]]
TCF_EM_CANID nlattr_tca_ematch_tree_list[tcf_ematch_hdr_t[TCF_EM_CANID, can_filter]]
TCF_EM_IPSET nlattr_tca_ematch_tree_list[tcf_ematch_hdr_t[TCF_EM_IPSET, xt_set_info]]
TCF_EM_IPT nlattr_tca_ematch_tree_list[tcf_ematch_hdr_t[TCF_EM_IPT, array[tcf_em_ipt_policy]]]
] [varlen]
type tcf_ematch_hdr[KIND] {

View File

@ -126,7 +126,7 @@ tipc_nl_policy [
TIPC_NLA_SOCK nlattr[TIPC_NLA_SOCK, array[tipc_nl_sock_policy]]
TIPC_NLA_LINK nlattr[TIPC_NLA_LINK, array[tipc_nl_link_policy]]
TIPC_NLA_MEDIA nlattr[TIPC_NLA_MEDIA, array[tipc_nl_media_policy]]
TIPC_NLA_NODE nlattr[TIPC_NLA_NODE, array[tipc_nl_node_policy]]
TIPC_NLA_NODE nlnest[TIPC_NLA_NODE, array[tipc_nl_node_policy]]
TIPC_NLA_NET nlattr[TIPC_NLA_NET, array[tipc_nl_net_policy]]
TIPC_NLA_MON nlattr[TIPC_NLA_MON, array[tipc_nl_monitor_policy]]
] [varlen]

View File

@ -40,8 +40,41 @@ compare_data [
str string
blob array[int8]
arr16be array[int16be]
nla array[compare_nla]
] [varlen]
compare_nla [
a0 nlattr[0xaa, int8]
a1 nlattr[0xbb, int16]
a2 nlattr[0xcc, int32]
a3 nlattr[0xdd, int64]
a4 nlattr[0xee, stringnoz]
a5 nlnest[0xaa, int8]
a6 nlnest[0xaa, int32]
a7 nlnetw[0xaa, int8]
a8 nlnetw[0xaa, int32]
] [varlen]
type nlattr_t[TYPE, PAYLOAD] {
nla_len offsetof[size, int16]
nla_type TYPE
payload PAYLOAD
size void
} [packed, align_4]
type nlattr_tt[TYPE, NETORDER, NESTED, PAYLOAD] {
nla_len offsetof[size, int16]
nla_type TYPE
NLA_F_NET_BYTEORDER const[NETORDER, int16:1]
NLA_F_NESTED const[NESTED, int16:1]
payload PAYLOAD
size void
} [packed, align_4]
type nlattr[TYPE, PAYLOAD] nlattr_t[const[TYPE, int16], PAYLOAD]
type nlnest[TYPE, PAYLOAD] nlattr_tt[const[TYPE, int16:14], 0, 1, PAYLOAD]
type nlnetw[TYPE, PAYLOAD] nlattr_tt[const[TYPE, int16:14], 1, 0, PAYLOAD]
align0 {
f0 int16
f1 int32

View File

@ -55,7 +55,85 @@ var structDescs_32_fork_shmem = []*KeyedStruct{
&BufferType{TypeCommon: TypeCommon{TypeName: "string", FldName: "str", IsVarlen: true}, Kind: 2},
&BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "blob", IsVarlen: true}},
&ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "arr16be", IsVarlen: true}, Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16be", TypeSize: 2}, ArgFormat: 1}}},
&ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "nla", IsVarlen: true}, Type: &UnionType{Key: StructKey{Name: "compare_nla"}}},
}}},
{Key: StructKey{Name: "compare_nla"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "compare_nla", IsVarlen: true}, Fields: []Type{
&StructType{Key: StructKey{Name: "nlattr_t[const[0xaa, int16], int8]"}, FldName: "a0"},
&StructType{Key: StructKey{Name: "nlattr_t[const[0xbb, int16], int16]"}, FldName: "a1"},
&StructType{Key: StructKey{Name: "nlattr_t[const[0xcc, int16], int32]"}, FldName: "a2"},
&StructType{Key: StructKey{Name: "nlattr_t[const[0xdd, int16], int64]"}, FldName: "a3"},
&StructType{Key: StructKey{Name: "nlattr_t[const[0xee, int16], stringnoz]"}, FldName: "a4"},
&StructType{Key: StructKey{Name: "nlattr_tt[const[0xaa, int16:14], 0, 1, int8]"}, FldName: "a5"},
&StructType{Key: StructKey{Name: "nlattr_tt[const[0xaa, int16:14], 0, 1, int32]"}, FldName: "a6"},
&StructType{Key: StructKey{Name: "nlattr_tt[const[0xaa, int16:14], 1, 0, int8]"}, FldName: "a7"},
&StructType{Key: StructKey{Name: "nlattr_tt[const[0xaa, int16:14], 1, 0, int32]"}, FldName: "a8"},
}}},
{Key: StructKey{Name: "nlattr_t[const[0xaa, int16], int8]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "nlattr_t[const[0xaa, int16], int8]", TypeSize: 8}, Fields: []Type{
&LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "offsetof", FldName: "nla_len", TypeSize: 2}}, BitSize: 8, Offset: true, Path: []string{"size"}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "nla_type", TypeSize: 2}}, Val: 170},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "payload", TypeSize: 1}}},
&BufferType{TypeCommon: TypeCommon{TypeName: "void", FldName: "size"}, Kind: 1},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 3}}, IsPad: true},
}, AlignAttr: 4}},
{Key: StructKey{Name: "nlattr_t[const[0xbb, int16], int16]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "nlattr_t[const[0xbb, int16], int16]", TypeSize: 8}, Fields: []Type{
&LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "offsetof", FldName: "nla_len", TypeSize: 2}}, BitSize: 8, Offset: true, Path: []string{"size"}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "nla_type", TypeSize: 2}}, Val: 187},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "payload", TypeSize: 2}}},
&BufferType{TypeCommon: TypeCommon{TypeName: "void", FldName: "size"}, Kind: 1},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 2}}, IsPad: true},
}, AlignAttr: 4}},
{Key: StructKey{Name: "nlattr_t[const[0xcc, int16], int32]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "nlattr_t[const[0xcc, int16], int32]", TypeSize: 8}, Fields: []Type{
&LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "offsetof", FldName: "nla_len", TypeSize: 2}}, BitSize: 8, Offset: true, Path: []string{"size"}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "nla_type", TypeSize: 2}}, Val: 204},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "payload", TypeSize: 4}}},
&BufferType{TypeCommon: TypeCommon{TypeName: "void", FldName: "size"}, Kind: 1},
}, AlignAttr: 4}},
{Key: StructKey{Name: "nlattr_t[const[0xdd, int16], int64]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "nlattr_t[const[0xdd, int16], int64]", TypeSize: 12}, Fields: []Type{
&LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "offsetof", FldName: "nla_len", TypeSize: 2}}, BitSize: 8, Offset: true, Path: []string{"size"}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "nla_type", TypeSize: 2}}, Val: 221},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "payload", TypeSize: 8}}},
&BufferType{TypeCommon: TypeCommon{TypeName: "void", FldName: "size"}, Kind: 1},
}, AlignAttr: 4}},
{Key: StructKey{Name: "nlattr_t[const[0xee, int16], stringnoz]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "nlattr_t[const[0xee, int16], stringnoz]", IsVarlen: true}, Fields: []Type{
&LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "offsetof", FldName: "nla_len", TypeSize: 2}}, BitSize: 8, Offset: true, Path: []string{"size"}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "nla_type", TypeSize: 2}}, Val: 238},
&BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "payload", IsVarlen: true}, Kind: 2, NoZ: true},
&BufferType{TypeCommon: TypeCommon{TypeName: "void", FldName: "size"}, Kind: 1},
}, AlignAttr: 4}},
{Key: StructKey{Name: "nlattr_tt[const[0xaa, int16:14], 0, 1, int32]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "nlattr_tt[const[0xaa, int16:14], 0, 1, int32]", TypeSize: 8}, Fields: []Type{
&LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "offsetof", FldName: "nla_len", TypeSize: 2}}, BitSize: 8, Offset: true, Path: []string{"size"}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "nla_type", TypeSize: 1}, BitfieldLen: 14, BitfieldUnit: 2}, Val: 170},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "NLA_F_NET_BYTEORDER"}, BitfieldOff: 6, BitfieldLen: 1, BitfieldUnit: 2}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "NLA_F_NESTED", TypeSize: 1}, BitfieldOff: 7, BitfieldLen: 1, BitfieldUnit: 2}, Val: 1},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "payload", TypeSize: 4}}},
&BufferType{TypeCommon: TypeCommon{TypeName: "void", FldName: "size"}, Kind: 1},
}, AlignAttr: 4}},
{Key: StructKey{Name: "nlattr_tt[const[0xaa, int16:14], 0, 1, int8]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "nlattr_tt[const[0xaa, int16:14], 0, 1, int8]", TypeSize: 8}, Fields: []Type{
&LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "offsetof", FldName: "nla_len", TypeSize: 2}}, BitSize: 8, Offset: true, Path: []string{"size"}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "nla_type", TypeSize: 1}, BitfieldLen: 14, BitfieldUnit: 2}, Val: 170},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "NLA_F_NET_BYTEORDER"}, BitfieldOff: 6, BitfieldLen: 1, BitfieldUnit: 2}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "NLA_F_NESTED", TypeSize: 1}, BitfieldOff: 7, BitfieldLen: 1, BitfieldUnit: 2}, Val: 1},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "payload", TypeSize: 1}}},
&BufferType{TypeCommon: TypeCommon{TypeName: "void", FldName: "size"}, Kind: 1},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 3}}, IsPad: true},
}, AlignAttr: 4}},
{Key: StructKey{Name: "nlattr_tt[const[0xaa, int16:14], 1, 0, int32]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "nlattr_tt[const[0xaa, int16:14], 1, 0, int32]", TypeSize: 8}, Fields: []Type{
&LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "offsetof", FldName: "nla_len", TypeSize: 2}}, BitSize: 8, Offset: true, Path: []string{"size"}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "nla_type", TypeSize: 1}, BitfieldLen: 14, BitfieldUnit: 2}, Val: 170},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "NLA_F_NET_BYTEORDER"}, BitfieldOff: 6, BitfieldLen: 1, BitfieldUnit: 2}, Val: 1},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "NLA_F_NESTED", TypeSize: 1}, BitfieldOff: 7, BitfieldLen: 1, BitfieldUnit: 2}},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "payload", TypeSize: 4}}},
&BufferType{TypeCommon: TypeCommon{TypeName: "void", FldName: "size"}, Kind: 1},
}, AlignAttr: 4}},
{Key: StructKey{Name: "nlattr_tt[const[0xaa, int16:14], 1, 0, int8]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "nlattr_tt[const[0xaa, int16:14], 1, 0, int8]", TypeSize: 8}, Fields: []Type{
&LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "offsetof", FldName: "nla_len", TypeSize: 2}}, BitSize: 8, Offset: true, Path: []string{"size"}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "nla_type", TypeSize: 1}, BitfieldLen: 14, BitfieldUnit: 2}, Val: 170},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "NLA_F_NET_BYTEORDER"}, BitfieldOff: 6, BitfieldLen: 1, BitfieldUnit: 2}, Val: 1},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "NLA_F_NESTED", TypeSize: 1}, BitfieldOff: 7, BitfieldLen: 1, BitfieldUnit: 2}},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "payload", TypeSize: 1}}},
&BufferType{TypeCommon: TypeCommon{TypeName: "void", FldName: "size"}, Kind: 1},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 3}}, IsPad: true},
}, AlignAttr: 4}},
{Key: StructKey{Name: "syz_bf_align[syz_bf_struct10]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "syz_bf_align[syz_bf_struct10]", TypeSize: 24}, Fields: []Type{
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f0", TypeSize: 1}}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 7}}, IsPad: true},
@ -386,4 +464,4 @@ var consts_32_fork_shmem = []ConstValue{
{Name: "ONLY_32BITS_CONST", Value: 1},
}
const revision_32_fork_shmem = "65b45f9333f75578cb84103da5f8f8cac77e1cb2"
const revision_32_fork_shmem = "2efcbbbee05d0f1b1815d450e261aa68e6ea3243"

View File

@ -54,7 +54,85 @@ var structDescs_32_shmem = []*KeyedStruct{
&BufferType{TypeCommon: TypeCommon{TypeName: "string", FldName: "str", IsVarlen: true}, Kind: 2},
&BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "blob", IsVarlen: true}},
&ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "arr16be", IsVarlen: true}, Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16be", TypeSize: 2}, ArgFormat: 1}}},
&ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "nla", IsVarlen: true}, Type: &UnionType{Key: StructKey{Name: "compare_nla"}}},
}}},
{Key: StructKey{Name: "compare_nla"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "compare_nla", IsVarlen: true}, Fields: []Type{
&StructType{Key: StructKey{Name: "nlattr_t[const[0xaa, int16], int8]"}, FldName: "a0"},
&StructType{Key: StructKey{Name: "nlattr_t[const[0xbb, int16], int16]"}, FldName: "a1"},
&StructType{Key: StructKey{Name: "nlattr_t[const[0xcc, int16], int32]"}, FldName: "a2"},
&StructType{Key: StructKey{Name: "nlattr_t[const[0xdd, int16], int64]"}, FldName: "a3"},
&StructType{Key: StructKey{Name: "nlattr_t[const[0xee, int16], stringnoz]"}, FldName: "a4"},
&StructType{Key: StructKey{Name: "nlattr_tt[const[0xaa, int16:14], 0, 1, int8]"}, FldName: "a5"},
&StructType{Key: StructKey{Name: "nlattr_tt[const[0xaa, int16:14], 0, 1, int32]"}, FldName: "a6"},
&StructType{Key: StructKey{Name: "nlattr_tt[const[0xaa, int16:14], 1, 0, int8]"}, FldName: "a7"},
&StructType{Key: StructKey{Name: "nlattr_tt[const[0xaa, int16:14], 1, 0, int32]"}, FldName: "a8"},
}}},
{Key: StructKey{Name: "nlattr_t[const[0xaa, int16], int8]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "nlattr_t[const[0xaa, int16], int8]", TypeSize: 8}, Fields: []Type{
&LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "offsetof", FldName: "nla_len", TypeSize: 2}}, BitSize: 8, Offset: true, Path: []string{"size"}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "nla_type", TypeSize: 2}}, Val: 170},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "payload", TypeSize: 1}}},
&BufferType{TypeCommon: TypeCommon{TypeName: "void", FldName: "size"}, Kind: 1},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 3}}, IsPad: true},
}, AlignAttr: 4}},
{Key: StructKey{Name: "nlattr_t[const[0xbb, int16], int16]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "nlattr_t[const[0xbb, int16], int16]", TypeSize: 8}, Fields: []Type{
&LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "offsetof", FldName: "nla_len", TypeSize: 2}}, BitSize: 8, Offset: true, Path: []string{"size"}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "nla_type", TypeSize: 2}}, Val: 187},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "payload", TypeSize: 2}}},
&BufferType{TypeCommon: TypeCommon{TypeName: "void", FldName: "size"}, Kind: 1},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 2}}, IsPad: true},
}, AlignAttr: 4}},
{Key: StructKey{Name: "nlattr_t[const[0xcc, int16], int32]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "nlattr_t[const[0xcc, int16], int32]", TypeSize: 8}, Fields: []Type{
&LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "offsetof", FldName: "nla_len", TypeSize: 2}}, BitSize: 8, Offset: true, Path: []string{"size"}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "nla_type", TypeSize: 2}}, Val: 204},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "payload", TypeSize: 4}}},
&BufferType{TypeCommon: TypeCommon{TypeName: "void", FldName: "size"}, Kind: 1},
}, AlignAttr: 4}},
{Key: StructKey{Name: "nlattr_t[const[0xdd, int16], int64]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "nlattr_t[const[0xdd, int16], int64]", TypeSize: 12}, Fields: []Type{
&LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "offsetof", FldName: "nla_len", TypeSize: 2}}, BitSize: 8, Offset: true, Path: []string{"size"}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "nla_type", TypeSize: 2}}, Val: 221},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "payload", TypeSize: 8}}},
&BufferType{TypeCommon: TypeCommon{TypeName: "void", FldName: "size"}, Kind: 1},
}, AlignAttr: 4}},
{Key: StructKey{Name: "nlattr_t[const[0xee, int16], stringnoz]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "nlattr_t[const[0xee, int16], stringnoz]", IsVarlen: true}, Fields: []Type{
&LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "offsetof", FldName: "nla_len", TypeSize: 2}}, BitSize: 8, Offset: true, Path: []string{"size"}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "nla_type", TypeSize: 2}}, Val: 238},
&BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "payload", IsVarlen: true}, Kind: 2, NoZ: true},
&BufferType{TypeCommon: TypeCommon{TypeName: "void", FldName: "size"}, Kind: 1},
}, AlignAttr: 4}},
{Key: StructKey{Name: "nlattr_tt[const[0xaa, int16:14], 0, 1, int32]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "nlattr_tt[const[0xaa, int16:14], 0, 1, int32]", TypeSize: 8}, Fields: []Type{
&LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "offsetof", FldName: "nla_len", TypeSize: 2}}, BitSize: 8, Offset: true, Path: []string{"size"}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "nla_type", TypeSize: 1}, BitfieldLen: 14, BitfieldUnit: 2}, Val: 170},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "NLA_F_NET_BYTEORDER"}, BitfieldOff: 6, BitfieldLen: 1, BitfieldUnit: 2}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "NLA_F_NESTED", TypeSize: 1}, BitfieldOff: 7, BitfieldLen: 1, BitfieldUnit: 2}, Val: 1},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "payload", TypeSize: 4}}},
&BufferType{TypeCommon: TypeCommon{TypeName: "void", FldName: "size"}, Kind: 1},
}, AlignAttr: 4}},
{Key: StructKey{Name: "nlattr_tt[const[0xaa, int16:14], 0, 1, int8]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "nlattr_tt[const[0xaa, int16:14], 0, 1, int8]", TypeSize: 8}, Fields: []Type{
&LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "offsetof", FldName: "nla_len", TypeSize: 2}}, BitSize: 8, Offset: true, Path: []string{"size"}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "nla_type", TypeSize: 1}, BitfieldLen: 14, BitfieldUnit: 2}, Val: 170},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "NLA_F_NET_BYTEORDER"}, BitfieldOff: 6, BitfieldLen: 1, BitfieldUnit: 2}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "NLA_F_NESTED", TypeSize: 1}, BitfieldOff: 7, BitfieldLen: 1, BitfieldUnit: 2}, Val: 1},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "payload", TypeSize: 1}}},
&BufferType{TypeCommon: TypeCommon{TypeName: "void", FldName: "size"}, Kind: 1},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 3}}, IsPad: true},
}, AlignAttr: 4}},
{Key: StructKey{Name: "nlattr_tt[const[0xaa, int16:14], 1, 0, int32]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "nlattr_tt[const[0xaa, int16:14], 1, 0, int32]", TypeSize: 8}, Fields: []Type{
&LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "offsetof", FldName: "nla_len", TypeSize: 2}}, BitSize: 8, Offset: true, Path: []string{"size"}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "nla_type", TypeSize: 1}, BitfieldLen: 14, BitfieldUnit: 2}, Val: 170},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "NLA_F_NET_BYTEORDER"}, BitfieldOff: 6, BitfieldLen: 1, BitfieldUnit: 2}, Val: 1},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "NLA_F_NESTED", TypeSize: 1}, BitfieldOff: 7, BitfieldLen: 1, BitfieldUnit: 2}},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "payload", TypeSize: 4}}},
&BufferType{TypeCommon: TypeCommon{TypeName: "void", FldName: "size"}, Kind: 1},
}, AlignAttr: 4}},
{Key: StructKey{Name: "nlattr_tt[const[0xaa, int16:14], 1, 0, int8]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "nlattr_tt[const[0xaa, int16:14], 1, 0, int8]", TypeSize: 8}, Fields: []Type{
&LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "offsetof", FldName: "nla_len", TypeSize: 2}}, BitSize: 8, Offset: true, Path: []string{"size"}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "nla_type", TypeSize: 1}, BitfieldLen: 14, BitfieldUnit: 2}, Val: 170},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "NLA_F_NET_BYTEORDER"}, BitfieldOff: 6, BitfieldLen: 1, BitfieldUnit: 2}, Val: 1},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "NLA_F_NESTED", TypeSize: 1}, BitfieldOff: 7, BitfieldLen: 1, BitfieldUnit: 2}},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "payload", TypeSize: 1}}},
&BufferType{TypeCommon: TypeCommon{TypeName: "void", FldName: "size"}, Kind: 1},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 3}}, IsPad: true},
}, AlignAttr: 4}},
{Key: StructKey{Name: "syz_bf_align[syz_bf_struct10]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "syz_bf_align[syz_bf_struct10]", TypeSize: 16}, Fields: []Type{
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f0", TypeSize: 1}}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 3}}, IsPad: true},
@ -384,4 +462,4 @@ var consts_32_shmem = []ConstValue{
{Name: "ONLY_32BITS_CONST", Value: 1},
}
const revision_32_shmem = "b8778b191df966880a432c9570ed01febb5fd600"
const revision_32_shmem = "4d149786a888a3df191cfc3bb5504cdbe4303b99"

80
sys/test/gen/64.go generated
View File

@ -101,6 +101,18 @@ var structDescs_64 = []*KeyedStruct{
&BufferType{TypeCommon: TypeCommon{TypeName: "string", FldName: "str", IsVarlen: true}, Kind: 2},
&BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "blob", IsVarlen: true}},
&ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "arr16be", IsVarlen: true}, Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16be", TypeSize: 2}, ArgFormat: 1}}},
&ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "nla", IsVarlen: true}, Type: &UnionType{Key: StructKey{Name: "compare_nla"}}},
}}},
{Key: StructKey{Name: "compare_nla"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "compare_nla", IsVarlen: true}, Fields: []Type{
&StructType{Key: StructKey{Name: "nlattr_t[const[0xaa, int16], int8]"}, FldName: "a0"},
&StructType{Key: StructKey{Name: "nlattr_t[const[0xbb, int16], int16]"}, FldName: "a1"},
&StructType{Key: StructKey{Name: "nlattr_t[const[0xcc, int16], int32]"}, FldName: "a2"},
&StructType{Key: StructKey{Name: "nlattr_t[const[0xdd, int16], int64]"}, FldName: "a3"},
&StructType{Key: StructKey{Name: "nlattr_t[const[0xee, int16], stringnoz]"}, FldName: "a4"},
&StructType{Key: StructKey{Name: "nlattr_tt[const[0xaa, int16:14], 0, 1, int8]"}, FldName: "a5"},
&StructType{Key: StructKey{Name: "nlattr_tt[const[0xaa, int16:14], 0, 1, int32]"}, FldName: "a6"},
&StructType{Key: StructKey{Name: "nlattr_tt[const[0xaa, int16:14], 1, 0, int8]"}, FldName: "a7"},
&StructType{Key: StructKey{Name: "nlattr_tt[const[0xaa, int16:14], 1, 0, int32]"}, FldName: "a8"},
}}},
{Key: StructKey{Name: "excessive_fields"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "excessive_fields", TypeSize: 1}, Fields: []Type{
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f1", TypeSize: 1}}},
@ -173,6 +185,72 @@ var structDescs_64 = []*KeyedStruct{
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f2", TypeSize: 1}}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 3}}, IsPad: true},
}}},
{Key: StructKey{Name: "nlattr_t[const[0xaa, int16], int8]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "nlattr_t[const[0xaa, int16], int8]", TypeSize: 8}, Fields: []Type{
&LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "offsetof", FldName: "nla_len", TypeSize: 2}}, BitSize: 8, Offset: true, Path: []string{"size"}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "nla_type", TypeSize: 2}}, Val: 170},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "payload", TypeSize: 1}}},
&BufferType{TypeCommon: TypeCommon{TypeName: "void", FldName: "size"}, Kind: 1},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 3}}, IsPad: true},
}, AlignAttr: 4}},
{Key: StructKey{Name: "nlattr_t[const[0xbb, int16], int16]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "nlattr_t[const[0xbb, int16], int16]", TypeSize: 8}, Fields: []Type{
&LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "offsetof", FldName: "nla_len", TypeSize: 2}}, BitSize: 8, Offset: true, Path: []string{"size"}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "nla_type", TypeSize: 2}}, Val: 187},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "payload", TypeSize: 2}}},
&BufferType{TypeCommon: TypeCommon{TypeName: "void", FldName: "size"}, Kind: 1},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 2}}, IsPad: true},
}, AlignAttr: 4}},
{Key: StructKey{Name: "nlattr_t[const[0xcc, int16], int32]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "nlattr_t[const[0xcc, int16], int32]", TypeSize: 8}, Fields: []Type{
&LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "offsetof", FldName: "nla_len", TypeSize: 2}}, BitSize: 8, Offset: true, Path: []string{"size"}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "nla_type", TypeSize: 2}}, Val: 204},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "payload", TypeSize: 4}}},
&BufferType{TypeCommon: TypeCommon{TypeName: "void", FldName: "size"}, Kind: 1},
}, AlignAttr: 4}},
{Key: StructKey{Name: "nlattr_t[const[0xdd, int16], int64]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "nlattr_t[const[0xdd, int16], int64]", TypeSize: 12}, Fields: []Type{
&LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "offsetof", FldName: "nla_len", TypeSize: 2}}, BitSize: 8, Offset: true, Path: []string{"size"}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "nla_type", TypeSize: 2}}, Val: 221},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "payload", TypeSize: 8}}},
&BufferType{TypeCommon: TypeCommon{TypeName: "void", FldName: "size"}, Kind: 1},
}, AlignAttr: 4}},
{Key: StructKey{Name: "nlattr_t[const[0xee, int16], stringnoz]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "nlattr_t[const[0xee, int16], stringnoz]", IsVarlen: true}, Fields: []Type{
&LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "offsetof", FldName: "nla_len", TypeSize: 2}}, BitSize: 8, Offset: true, Path: []string{"size"}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "nla_type", TypeSize: 2}}, Val: 238},
&BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "payload", IsVarlen: true}, Kind: 2, NoZ: true},
&BufferType{TypeCommon: TypeCommon{TypeName: "void", FldName: "size"}, Kind: 1},
}, AlignAttr: 4}},
{Key: StructKey{Name: "nlattr_tt[const[0xaa, int16:14], 0, 1, int32]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "nlattr_tt[const[0xaa, int16:14], 0, 1, int32]", TypeSize: 8}, Fields: []Type{
&LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "offsetof", FldName: "nla_len", TypeSize: 2}}, BitSize: 8, Offset: true, Path: []string{"size"}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "nla_type", TypeSize: 1}, BitfieldLen: 14, BitfieldUnit: 2}, Val: 170},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "NLA_F_NET_BYTEORDER"}, BitfieldOff: 6, BitfieldLen: 1, BitfieldUnit: 2}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "NLA_F_NESTED", TypeSize: 1}, BitfieldOff: 7, BitfieldLen: 1, BitfieldUnit: 2}, Val: 1},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "payload", TypeSize: 4}}},
&BufferType{TypeCommon: TypeCommon{TypeName: "void", FldName: "size"}, Kind: 1},
}, AlignAttr: 4}},
{Key: StructKey{Name: "nlattr_tt[const[0xaa, int16:14], 0, 1, int8]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "nlattr_tt[const[0xaa, int16:14], 0, 1, int8]", TypeSize: 8}, Fields: []Type{
&LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "offsetof", FldName: "nla_len", TypeSize: 2}}, BitSize: 8, Offset: true, Path: []string{"size"}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "nla_type", TypeSize: 1}, BitfieldLen: 14, BitfieldUnit: 2}, Val: 170},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "NLA_F_NET_BYTEORDER"}, BitfieldOff: 6, BitfieldLen: 1, BitfieldUnit: 2}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "NLA_F_NESTED", TypeSize: 1}, BitfieldOff: 7, BitfieldLen: 1, BitfieldUnit: 2}, Val: 1},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "payload", TypeSize: 1}}},
&BufferType{TypeCommon: TypeCommon{TypeName: "void", FldName: "size"}, Kind: 1},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 3}}, IsPad: true},
}, AlignAttr: 4}},
{Key: StructKey{Name: "nlattr_tt[const[0xaa, int16:14], 1, 0, int32]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "nlattr_tt[const[0xaa, int16:14], 1, 0, int32]", TypeSize: 8}, Fields: []Type{
&LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "offsetof", FldName: "nla_len", TypeSize: 2}}, BitSize: 8, Offset: true, Path: []string{"size"}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "nla_type", TypeSize: 1}, BitfieldLen: 14, BitfieldUnit: 2}, Val: 170},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "NLA_F_NET_BYTEORDER"}, BitfieldOff: 6, BitfieldLen: 1, BitfieldUnit: 2}, Val: 1},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "NLA_F_NESTED", TypeSize: 1}, BitfieldOff: 7, BitfieldLen: 1, BitfieldUnit: 2}},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "payload", TypeSize: 4}}},
&BufferType{TypeCommon: TypeCommon{TypeName: "void", FldName: "size"}, Kind: 1},
}, AlignAttr: 4}},
{Key: StructKey{Name: "nlattr_tt[const[0xaa, int16:14], 1, 0, int8]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "nlattr_tt[const[0xaa, int16:14], 1, 0, int8]", TypeSize: 8}, Fields: []Type{
&LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "offsetof", FldName: "nla_len", TypeSize: 2}}, BitSize: 8, Offset: true, Path: []string{"size"}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "nla_type", TypeSize: 1}, BitfieldLen: 14, BitfieldUnit: 2}, Val: 170},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "NLA_F_NET_BYTEORDER"}, BitfieldOff: 6, BitfieldLen: 1, BitfieldUnit: 2}, Val: 1},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "NLA_F_NESTED", TypeSize: 1}, BitfieldOff: 7, BitfieldLen: 1, BitfieldUnit: 2}},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "payload", TypeSize: 1}}},
&BufferType{TypeCommon: TypeCommon{TypeName: "void", FldName: "size"}, Kind: 1},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 3}}, IsPad: true},
}, AlignAttr: 4}},
{Key: StructKey{Name: "offsetof0"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "offsetof0", TypeSize: 72}, Fields: []Type{
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "f0", TypeSize: 4}}},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f1", TypeSize: 1}}},
@ -1362,4 +1440,4 @@ var consts_64 = []ConstValue{
{Name: "SYS_unsupported"},
}
const revision_64 = "c961c6f32ad948f6dfbd83c8dc123a55bd261814"
const revision_64 = "70ed4d89f5c1baa13983ab0123304d124539e73f"

View File

@ -55,7 +55,85 @@ var structDescs_64_fork = []*KeyedStruct{
&BufferType{TypeCommon: TypeCommon{TypeName: "string", FldName: "str", IsVarlen: true}, Kind: 2},
&BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "blob", IsVarlen: true}},
&ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "arr16be", IsVarlen: true}, Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16be", TypeSize: 2}, ArgFormat: 1}}},
&ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "nla", IsVarlen: true}, Type: &UnionType{Key: StructKey{Name: "compare_nla"}}},
}}},
{Key: StructKey{Name: "compare_nla"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "compare_nla", IsVarlen: true}, Fields: []Type{
&StructType{Key: StructKey{Name: "nlattr_t[const[0xaa, int16], int8]"}, FldName: "a0"},
&StructType{Key: StructKey{Name: "nlattr_t[const[0xbb, int16], int16]"}, FldName: "a1"},
&StructType{Key: StructKey{Name: "nlattr_t[const[0xcc, int16], int32]"}, FldName: "a2"},
&StructType{Key: StructKey{Name: "nlattr_t[const[0xdd, int16], int64]"}, FldName: "a3"},
&StructType{Key: StructKey{Name: "nlattr_t[const[0xee, int16], stringnoz]"}, FldName: "a4"},
&StructType{Key: StructKey{Name: "nlattr_tt[const[0xaa, int16:14], 0, 1, int8]"}, FldName: "a5"},
&StructType{Key: StructKey{Name: "nlattr_tt[const[0xaa, int16:14], 0, 1, int32]"}, FldName: "a6"},
&StructType{Key: StructKey{Name: "nlattr_tt[const[0xaa, int16:14], 1, 0, int8]"}, FldName: "a7"},
&StructType{Key: StructKey{Name: "nlattr_tt[const[0xaa, int16:14], 1, 0, int32]"}, FldName: "a8"},
}}},
{Key: StructKey{Name: "nlattr_t[const[0xaa, int16], int8]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "nlattr_t[const[0xaa, int16], int8]", TypeSize: 8}, Fields: []Type{
&LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "offsetof", FldName: "nla_len", TypeSize: 2}}, BitSize: 8, Offset: true, Path: []string{"size"}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "nla_type", TypeSize: 2}}, Val: 170},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "payload", TypeSize: 1}}},
&BufferType{TypeCommon: TypeCommon{TypeName: "void", FldName: "size"}, Kind: 1},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 3}}, IsPad: true},
}, AlignAttr: 4}},
{Key: StructKey{Name: "nlattr_t[const[0xbb, int16], int16]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "nlattr_t[const[0xbb, int16], int16]", TypeSize: 8}, Fields: []Type{
&LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "offsetof", FldName: "nla_len", TypeSize: 2}}, BitSize: 8, Offset: true, Path: []string{"size"}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "nla_type", TypeSize: 2}}, Val: 187},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "payload", TypeSize: 2}}},
&BufferType{TypeCommon: TypeCommon{TypeName: "void", FldName: "size"}, Kind: 1},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 2}}, IsPad: true},
}, AlignAttr: 4}},
{Key: StructKey{Name: "nlattr_t[const[0xcc, int16], int32]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "nlattr_t[const[0xcc, int16], int32]", TypeSize: 8}, Fields: []Type{
&LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "offsetof", FldName: "nla_len", TypeSize: 2}}, BitSize: 8, Offset: true, Path: []string{"size"}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "nla_type", TypeSize: 2}}, Val: 204},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "payload", TypeSize: 4}}},
&BufferType{TypeCommon: TypeCommon{TypeName: "void", FldName: "size"}, Kind: 1},
}, AlignAttr: 4}},
{Key: StructKey{Name: "nlattr_t[const[0xdd, int16], int64]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "nlattr_t[const[0xdd, int16], int64]", TypeSize: 12}, Fields: []Type{
&LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "offsetof", FldName: "nla_len", TypeSize: 2}}, BitSize: 8, Offset: true, Path: []string{"size"}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "nla_type", TypeSize: 2}}, Val: 221},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "payload", TypeSize: 8}}},
&BufferType{TypeCommon: TypeCommon{TypeName: "void", FldName: "size"}, Kind: 1},
}, AlignAttr: 4}},
{Key: StructKey{Name: "nlattr_t[const[0xee, int16], stringnoz]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "nlattr_t[const[0xee, int16], stringnoz]", IsVarlen: true}, Fields: []Type{
&LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "offsetof", FldName: "nla_len", TypeSize: 2}}, BitSize: 8, Offset: true, Path: []string{"size"}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "nla_type", TypeSize: 2}}, Val: 238},
&BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "payload", IsVarlen: true}, Kind: 2, NoZ: true},
&BufferType{TypeCommon: TypeCommon{TypeName: "void", FldName: "size"}, Kind: 1},
}, AlignAttr: 4}},
{Key: StructKey{Name: "nlattr_tt[const[0xaa, int16:14], 0, 1, int32]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "nlattr_tt[const[0xaa, int16:14], 0, 1, int32]", TypeSize: 8}, Fields: []Type{
&LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "offsetof", FldName: "nla_len", TypeSize: 2}}, BitSize: 8, Offset: true, Path: []string{"size"}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "nla_type", TypeSize: 1}, BitfieldLen: 14, BitfieldUnit: 2}, Val: 170},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "NLA_F_NET_BYTEORDER"}, BitfieldOff: 6, BitfieldLen: 1, BitfieldUnit: 2}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "NLA_F_NESTED", TypeSize: 1}, BitfieldOff: 7, BitfieldLen: 1, BitfieldUnit: 2}, Val: 1},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "payload", TypeSize: 4}}},
&BufferType{TypeCommon: TypeCommon{TypeName: "void", FldName: "size"}, Kind: 1},
}, AlignAttr: 4}},
{Key: StructKey{Name: "nlattr_tt[const[0xaa, int16:14], 0, 1, int8]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "nlattr_tt[const[0xaa, int16:14], 0, 1, int8]", TypeSize: 8}, Fields: []Type{
&LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "offsetof", FldName: "nla_len", TypeSize: 2}}, BitSize: 8, Offset: true, Path: []string{"size"}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "nla_type", TypeSize: 1}, BitfieldLen: 14, BitfieldUnit: 2}, Val: 170},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "NLA_F_NET_BYTEORDER"}, BitfieldOff: 6, BitfieldLen: 1, BitfieldUnit: 2}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "NLA_F_NESTED", TypeSize: 1}, BitfieldOff: 7, BitfieldLen: 1, BitfieldUnit: 2}, Val: 1},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "payload", TypeSize: 1}}},
&BufferType{TypeCommon: TypeCommon{TypeName: "void", FldName: "size"}, Kind: 1},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 3}}, IsPad: true},
}, AlignAttr: 4}},
{Key: StructKey{Name: "nlattr_tt[const[0xaa, int16:14], 1, 0, int32]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "nlattr_tt[const[0xaa, int16:14], 1, 0, int32]", TypeSize: 8}, Fields: []Type{
&LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "offsetof", FldName: "nla_len", TypeSize: 2}}, BitSize: 8, Offset: true, Path: []string{"size"}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "nla_type", TypeSize: 1}, BitfieldLen: 14, BitfieldUnit: 2}, Val: 170},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "NLA_F_NET_BYTEORDER"}, BitfieldOff: 6, BitfieldLen: 1, BitfieldUnit: 2}, Val: 1},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "NLA_F_NESTED", TypeSize: 1}, BitfieldOff: 7, BitfieldLen: 1, BitfieldUnit: 2}},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "payload", TypeSize: 4}}},
&BufferType{TypeCommon: TypeCommon{TypeName: "void", FldName: "size"}, Kind: 1},
}, AlignAttr: 4}},
{Key: StructKey{Name: "nlattr_tt[const[0xaa, int16:14], 1, 0, int8]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "nlattr_tt[const[0xaa, int16:14], 1, 0, int8]", TypeSize: 8}, Fields: []Type{
&LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "offsetof", FldName: "nla_len", TypeSize: 2}}, BitSize: 8, Offset: true, Path: []string{"size"}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "nla_type", TypeSize: 1}, BitfieldLen: 14, BitfieldUnit: 2}, Val: 170},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "NLA_F_NET_BYTEORDER"}, BitfieldOff: 6, BitfieldLen: 1, BitfieldUnit: 2}, Val: 1},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "NLA_F_NESTED", TypeSize: 1}, BitfieldOff: 7, BitfieldLen: 1, BitfieldUnit: 2}},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "payload", TypeSize: 1}}},
&BufferType{TypeCommon: TypeCommon{TypeName: "void", FldName: "size"}, Kind: 1},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 3}}, IsPad: true},
}, AlignAttr: 4}},
{Key: StructKey{Name: "syz_bf_align[syz_bf_struct10]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "syz_bf_align[syz_bf_struct10]", TypeSize: 24}, Fields: []Type{
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f0", TypeSize: 1}}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 7}}, IsPad: true},
@ -385,4 +463,4 @@ var consts_64_fork = []ConstValue{
{Name: "IPPROTO_UDP", Value: 17},
}
const revision_64_fork = "eab9bc08c8b2f077a545740bfbb781687ba5221b"
const revision_64_fork = "b63e26f1ec94318b884578dc3115d82aa46c96dd"

11
sys/test/test/nla Normal file
View File

@ -0,0 +1,11 @@
syz_compare(&AUTO="0500aa0055000000", AUTO, &AUTO=@nla=[@a0={AUTO, AUTO, 0x55, ''}], AUTO)
syz_compare(&AUTO="0600bb0055550000", AUTO, &AUTO=@nla=[@a1={AUTO, AUTO, 0x5555, ''}], AUTO)
syz_compare(&AUTO="0800cc0055555555", AUTO, &AUTO=@nla=[@a2={AUTO, AUTO, 0x55555555, ''}], AUTO)
syz_compare(&AUTO="0c00dd005555555555555555", AUTO, &AUTO=@nla=[@a3={AUTO, AUTO, 0x5555555555555555, ''}], AUTO)
syz_compare(&AUTO="0400ee00", AUTO, &AUTO=@nla=[@a4={AUTO, AUTO, "", ''}], AUTO)
syz_compare(&AUTO="0500ee00aa000000", AUTO, &AUTO=@nla=[@a4={AUTO, AUTO, "aa", ''}], AUTO)
syz_compare(&AUTO="0700ee00aabbcc00", AUTO, &AUTO=@nla=[@a4={AUTO, AUTO, "aabbcc", ''}], AUTO)
syz_compare(&AUTO="0500aa8055000000", AUTO, &AUTO=@nla=[@a5={AUTO, AUTO, AUTO, AUTO, 0x55, ''}], AUTO)
syz_compare(&AUTO="0800aa8055555555", AUTO, &AUTO=@nla=[@a6={AUTO, AUTO, AUTO, AUTO, 0x55555555, ''}], AUTO)
syz_compare(&AUTO="0500aa4055000000", AUTO, &AUTO=@nla=[@a7={AUTO, AUTO, AUTO, AUTO, 0x55, ''}], AUTO)
syz_compare(&AUTO="0800aa4055555555", AUTO, &AUTO=@nla=[@a8={AUTO, AUTO, AUTO, AUTO, 0x55555555, ''}], AUTO)

View File

@ -75,7 +75,7 @@ func main() {
fmt.Fprintf(os.Stderr, "failed to read prog file: %v\n", err)
os.Exit(1)
}
p, err = target.Deserialize(data, prog.NonStrict)
p, err = target.Deserialize(data, prog.Strict)
if err != nil {
fmt.Fprintf(os.Stderr, "failed to deserialize the program: %v\n", err)
os.Exit(1)