aboutsummaryrefslogtreecommitdiffstats
path: root/sys/test
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2020-01-07 07:27:40 +0100
committerDmitry Vyukov <dvyukov@google.com>2020-01-07 10:02:10 +0100
commita0f466387dbca955f3681d7a163a5af174df0a4b (patch)
treede6fc306bc067b86712b09d377f9dac356ee5e5f /sys/test
parentd2bde102ff975f30067203b5d039174d54a1b701 (diff)
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).
Diffstat (limited to 'sys/test')
-rw-r--r--sys/test/exec.txt33
-rw-r--r--sys/test/gen/32_fork_shmem.go82
-rw-r--r--sys/test/gen/32_shmem.go82
-rw-r--r--sys/test/gen/64.go80
-rw-r--r--sys/test/gen/64_fork.go82
-rw-r--r--sys/test/test/nla11
6 files changed, 363 insertions, 7 deletions
diff --git a/sys/test/exec.txt b/sys/test/exec.txt
index a2fb377cf..527895748 100644
--- a/sys/test/exec.txt
+++ b/sys/test/exec.txt
@@ -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
diff --git a/sys/test/gen/32_fork_shmem.go b/sys/test/gen/32_fork_shmem.go
index 16efe03e2..44ea8228b 100644
--- a/sys/test/gen/32_fork_shmem.go
+++ b/sys/test/gen/32_fork_shmem.go
@@ -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"
diff --git a/sys/test/gen/32_shmem.go b/sys/test/gen/32_shmem.go
index bd6c8c5f9..8bd5a36c6 100644
--- a/sys/test/gen/32_shmem.go
+++ b/sys/test/gen/32_shmem.go
@@ -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"
diff --git a/sys/test/gen/64.go b/sys/test/gen/64.go
index 45e47ea47..5e0bdea01 100644
--- a/sys/test/gen/64.go
+++ b/sys/test/gen/64.go
@@ -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"
diff --git a/sys/test/gen/64_fork.go b/sys/test/gen/64_fork.go
index 3593cd93b..88b7c355d 100644
--- a/sys/test/gen/64_fork.go
+++ b/sys/test/gen/64_fork.go
@@ -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"
diff --git a/sys/test/test/nla b/sys/test/test/nla
new file mode 100644
index 000000000..72bd24ff7
--- /dev/null
+++ b/sys/test/test/nla
@@ -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)