mirror of
https://github.com/reactos/syzkaller.git
synced 2024-11-27 21:30:33 +00:00
pkg/compiler: actually tolerate unsupported consts
The previous commit removes errors on unsupported structs/resources, but their usages still error. Fix that.
This commit is contained in:
parent
0b652d7278
commit
be2917712f
@ -394,6 +394,11 @@ func (comp *compiler) patchConsts(consts map[string]uint64) {
|
||||
comp.warning(pos, "unsupported %v: %v due to missing const %v",
|
||||
typ, name, missing)
|
||||
}
|
||||
// We have to keep partially broken resources and structs,
|
||||
// because otherwise their usages will error.
|
||||
if _, ok := decl.(*ast.Call); !ok {
|
||||
top = append(top, decl)
|
||||
}
|
||||
}
|
||||
}
|
||||
comp.desc.Nodes = top
|
||||
|
@ -85,6 +85,7 @@ var resourceArray = []*ResourceDesc{
|
||||
&ResourceDesc{Name: "sock_udp", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "resource-type", ArgDir: DirInOut, IsOptional: false}, TypeSize: 4, BigEndian: false, BitfieldLen: 0}}, Kind: []string{"fd", "sock", "sock_in", "sock_udp"}, Values: []uint64{0xffffffffffffffff, 18446744073709551516}},
|
||||
&ResourceDesc{Name: "sock_udp6", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "resource-type", ArgDir: DirInOut, IsOptional: false}, TypeSize: 4, BigEndian: false, BitfieldLen: 0}}, Kind: []string{"fd", "sock", "sock_in6", "sock_udp6"}, Values: []uint64{0xffffffffffffffff, 18446744073709551516}},
|
||||
&ResourceDesc{Name: "sock_unix", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "resource-type", ArgDir: DirInOut, IsOptional: false}, TypeSize: 4, BigEndian: false, BitfieldLen: 0}}, Kind: []string{"fd", "sock", "sock_unix"}, Values: []uint64{0xffffffffffffffff, 18446744073709551516}},
|
||||
&ResourceDesc{Name: "syz_missing_const_res", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "resource-type", ArgDir: DirInOut, IsOptional: false}, TypeSize: 4, BigEndian: false, BitfieldLen: 0}}, Kind: []string{"syz_missing_const_res"}, Values: []uint64{0}},
|
||||
&ResourceDesc{Name: "syz_res", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "resource-type", ArgDir: DirInOut, IsOptional: false}, TypeSize: 4, BigEndian: false, BitfieldLen: 0}}, Kind: []string{"syz_res"}, Values: []uint64{0xffff}},
|
||||
&ResourceDesc{Name: "tcp_seq_num", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "resource-type", ArgDir: DirInOut, IsOptional: false}, TypeSize: 4, BigEndian: false, BitfieldLen: 0}}, Kind: []string{"tcp_seq_num"}, Values: []uint64{0x42424242}},
|
||||
&ResourceDesc{Name: "te_session_id", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "resource-type", ArgDir: DirInOut, IsOptional: false}, TypeSize: 4, BigEndian: false, BitfieldLen: 0}}, Kind: []string{"te_session_id"}, Values: []uint64{0}},
|
||||
@ -681,6 +682,7 @@ var structArray = []Type{
|
||||
&StructType{TypeCommon: TypeCommon{TypeName: "syz_length_parent2_struct_inner_inner", IsOptional: false}},
|
||||
&StructType{TypeCommon: TypeCommon{TypeName: "syz_length_parent_struct", IsOptional: false}},
|
||||
&StructType{TypeCommon: TypeCommon{TypeName: "syz_length_vma_struct", IsOptional: false}},
|
||||
&StructType{TypeCommon: TypeCommon{TypeName: "syz_missing_const_struct", IsOptional: false}},
|
||||
&StructType{TypeCommon: TypeCommon{TypeName: "syz_recur_0", IsOptional: false}},
|
||||
&StructType{TypeCommon: TypeCommon{TypeName: "syz_recur_1", IsOptional: false}},
|
||||
&StructType{TypeCommon: TypeCommon{TypeName: "syz_recur_2", IsOptional: false}},
|
||||
@ -694,6 +696,7 @@ var structArray = []Type{
|
||||
&StructType{TypeCommon: TypeCommon{TypeName: "syz_union1_struct", IsOptional: false}, packed: true},
|
||||
&UnionType{TypeCommon: TypeCommon{TypeName: "syz_union2", IsOptional: false}, varlen: true},
|
||||
&StructType{TypeCommon: TypeCommon{TypeName: "syz_union2_struct", IsOptional: false}, packed: true},
|
||||
&StructType{TypeCommon: TypeCommon{TypeName: "syz_use_missing", IsOptional: false}},
|
||||
&StructType{TypeCommon: TypeCommon{TypeName: "syzn_devname", IsOptional: false}},
|
||||
&StructType{TypeCommon: TypeCommon{TypeName: "tcp6_pair", IsOptional: false}},
|
||||
&StructType{TypeCommon: TypeCommon{TypeName: "tcp_eol_option", IsOptional: false}, packed: true},
|
||||
@ -19134,6 +19137,24 @@ var structFields = []struct {
|
||||
&VmaType{TypeCommon: TypeCommon{TypeName: "vma", FldName: "f0", ArgDir: DirOut, IsOptional: false}, RangeBegin: 0, RangeEnd: 0},
|
||||
&LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "f1", ArgDir: DirOut, IsOptional: false}, TypeSize: 8, BigEndian: false, BitfieldLen: 0}, Buf: "f0", ByteSize: 0},
|
||||
}},
|
||||
{structKey{"syz_missing_const_struct", "", DirIn}, []Type{
|
||||
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "a0", ArgDir: DirIn, IsOptional: false}, TypeSize: 4, BigEndian: false, BitfieldLen: 0}, Val: uint64(0)},
|
||||
}},
|
||||
{structKey{"syz_missing_const_struct", "", DirInOut}, []Type{
|
||||
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "a0", ArgDir: DirInOut, IsOptional: false}, TypeSize: 4, BigEndian: false, BitfieldLen: 0}, Val: uint64(0)},
|
||||
}},
|
||||
{structKey{"syz_missing_const_struct", "", DirOut}, []Type{
|
||||
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "a0", ArgDir: DirOut, IsOptional: false}, TypeSize: 4, BigEndian: false, BitfieldLen: 0}, Val: uint64(0)},
|
||||
}},
|
||||
{structKey{"syz_missing_const_struct", "a1", DirIn}, []Type{
|
||||
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "a0", ArgDir: DirIn, IsOptional: false}, TypeSize: 4, BigEndian: false, BitfieldLen: 0}, Val: uint64(0)},
|
||||
}},
|
||||
{structKey{"syz_missing_const_struct", "a1", DirInOut}, []Type{
|
||||
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "a0", ArgDir: DirInOut, IsOptional: false}, TypeSize: 4, BigEndian: false, BitfieldLen: 0}, Val: uint64(0)},
|
||||
}},
|
||||
{structKey{"syz_missing_const_struct", "a1", DirOut}, []Type{
|
||||
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "a0", ArgDir: DirOut, IsOptional: false}, TypeSize: 4, BigEndian: false, BitfieldLen: 0}, Val: uint64(0)},
|
||||
}},
|
||||
{structKey{"syz_recur_0", "", DirIn}, []Type{
|
||||
&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a0", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_0", "", DirIn})},
|
||||
}},
|
||||
@ -19350,6 +19371,18 @@ var structFields = []struct {
|
||||
getStruct(structKey{"syz_union2", "f0", DirOut}),
|
||||
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f1", ArgDir: DirOut, IsOptional: false}, TypeSize: 1, BigEndian: false, BitfieldLen: 0}},
|
||||
}},
|
||||
{structKey{"syz_use_missing", "", DirIn}, []Type{
|
||||
&ResourceType{TypeCommon: TypeCommon{TypeName: "syz_missing_const_res", FldName: "a0", ArgDir: DirIn, IsOptional: false}, Desc: resource("syz_missing_const_res")},
|
||||
getStruct(structKey{"syz_missing_const_struct", "a1", DirIn}),
|
||||
}},
|
||||
{structKey{"syz_use_missing", "", DirInOut}, []Type{
|
||||
&ResourceType{TypeCommon: TypeCommon{TypeName: "syz_missing_const_res", FldName: "a0", ArgDir: DirInOut, IsOptional: false}, Desc: resource("syz_missing_const_res")},
|
||||
getStruct(structKey{"syz_missing_const_struct", "a1", DirInOut}),
|
||||
}},
|
||||
{structKey{"syz_use_missing", "", DirOut}, []Type{
|
||||
&ResourceType{TypeCommon: TypeCommon{TypeName: "syz_missing_const_res", FldName: "a0", ArgDir: DirOut, IsOptional: false}, Desc: resource("syz_missing_const_res")},
|
||||
getStruct(structKey{"syz_missing_const_struct", "a1", DirOut}),
|
||||
}},
|
||||
{structKey{"syzn_devname", "", DirIn}, []Type{
|
||||
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "s", ArgDir: DirIn, IsOptional: false}, TypeSize: 1, BigEndian: false, BitfieldLen: 0}, Val: uint64(115)},
|
||||
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "y", ArgDir: DirIn, IsOptional: false}, TypeSize: 1, BigEndian: false, BitfieldLen: 0}, Val: uint64(121)},
|
||||
|
@ -85,6 +85,7 @@ var resourceArray = []*ResourceDesc{
|
||||
&ResourceDesc{Name: "sock_udp", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "resource-type", ArgDir: DirInOut, IsOptional: false}, TypeSize: 4, BigEndian: false, BitfieldLen: 0}}, Kind: []string{"fd", "sock", "sock_in", "sock_udp"}, Values: []uint64{0xffffffffffffffff, 18446744073709551516}},
|
||||
&ResourceDesc{Name: "sock_udp6", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "resource-type", ArgDir: DirInOut, IsOptional: false}, TypeSize: 4, BigEndian: false, BitfieldLen: 0}}, Kind: []string{"fd", "sock", "sock_in6", "sock_udp6"}, Values: []uint64{0xffffffffffffffff, 18446744073709551516}},
|
||||
&ResourceDesc{Name: "sock_unix", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "resource-type", ArgDir: DirInOut, IsOptional: false}, TypeSize: 4, BigEndian: false, BitfieldLen: 0}}, Kind: []string{"fd", "sock", "sock_unix"}, Values: []uint64{0xffffffffffffffff, 18446744073709551516}},
|
||||
&ResourceDesc{Name: "syz_missing_const_res", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "resource-type", ArgDir: DirInOut, IsOptional: false}, TypeSize: 4, BigEndian: false, BitfieldLen: 0}}, Kind: []string{"syz_missing_const_res"}, Values: []uint64{0}},
|
||||
&ResourceDesc{Name: "syz_res", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "resource-type", ArgDir: DirInOut, IsOptional: false}, TypeSize: 4, BigEndian: false, BitfieldLen: 0}}, Kind: []string{"syz_res"}, Values: []uint64{0xffff}},
|
||||
&ResourceDesc{Name: "tcp_seq_num", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "resource-type", ArgDir: DirInOut, IsOptional: false}, TypeSize: 4, BigEndian: false, BitfieldLen: 0}}, Kind: []string{"tcp_seq_num"}, Values: []uint64{0x42424242}},
|
||||
&ResourceDesc{Name: "te_session_id", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "resource-type", ArgDir: DirInOut, IsOptional: false}, TypeSize: 4, BigEndian: false, BitfieldLen: 0}}, Kind: []string{"te_session_id"}, Values: []uint64{0}},
|
||||
@ -681,6 +682,7 @@ var structArray = []Type{
|
||||
&StructType{TypeCommon: TypeCommon{TypeName: "syz_length_parent2_struct_inner_inner", IsOptional: false}},
|
||||
&StructType{TypeCommon: TypeCommon{TypeName: "syz_length_parent_struct", IsOptional: false}},
|
||||
&StructType{TypeCommon: TypeCommon{TypeName: "syz_length_vma_struct", IsOptional: false}},
|
||||
&StructType{TypeCommon: TypeCommon{TypeName: "syz_missing_const_struct", IsOptional: false}},
|
||||
&StructType{TypeCommon: TypeCommon{TypeName: "syz_recur_0", IsOptional: false}},
|
||||
&StructType{TypeCommon: TypeCommon{TypeName: "syz_recur_1", IsOptional: false}},
|
||||
&StructType{TypeCommon: TypeCommon{TypeName: "syz_recur_2", IsOptional: false}},
|
||||
@ -694,6 +696,7 @@ var structArray = []Type{
|
||||
&StructType{TypeCommon: TypeCommon{TypeName: "syz_union1_struct", IsOptional: false}, packed: true},
|
||||
&UnionType{TypeCommon: TypeCommon{TypeName: "syz_union2", IsOptional: false}, varlen: true},
|
||||
&StructType{TypeCommon: TypeCommon{TypeName: "syz_union2_struct", IsOptional: false}, packed: true},
|
||||
&StructType{TypeCommon: TypeCommon{TypeName: "syz_use_missing", IsOptional: false}},
|
||||
&StructType{TypeCommon: TypeCommon{TypeName: "syzn_devname", IsOptional: false}},
|
||||
&StructType{TypeCommon: TypeCommon{TypeName: "tcp6_pair", IsOptional: false}},
|
||||
&StructType{TypeCommon: TypeCommon{TypeName: "tcp_eol_option", IsOptional: false}, packed: true},
|
||||
@ -19134,6 +19137,24 @@ var structFields = []struct {
|
||||
&VmaType{TypeCommon: TypeCommon{TypeName: "vma", FldName: "f0", ArgDir: DirOut, IsOptional: false}, RangeBegin: 0, RangeEnd: 0},
|
||||
&LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "f1", ArgDir: DirOut, IsOptional: false}, TypeSize: 8, BigEndian: false, BitfieldLen: 0}, Buf: "f0", ByteSize: 0},
|
||||
}},
|
||||
{structKey{"syz_missing_const_struct", "", DirIn}, []Type{
|
||||
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "a0", ArgDir: DirIn, IsOptional: false}, TypeSize: 4, BigEndian: false, BitfieldLen: 0}, Val: uint64(0)},
|
||||
}},
|
||||
{structKey{"syz_missing_const_struct", "", DirInOut}, []Type{
|
||||
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "a0", ArgDir: DirInOut, IsOptional: false}, TypeSize: 4, BigEndian: false, BitfieldLen: 0}, Val: uint64(0)},
|
||||
}},
|
||||
{structKey{"syz_missing_const_struct", "", DirOut}, []Type{
|
||||
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "a0", ArgDir: DirOut, IsOptional: false}, TypeSize: 4, BigEndian: false, BitfieldLen: 0}, Val: uint64(0)},
|
||||
}},
|
||||
{structKey{"syz_missing_const_struct", "a1", DirIn}, []Type{
|
||||
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "a0", ArgDir: DirIn, IsOptional: false}, TypeSize: 4, BigEndian: false, BitfieldLen: 0}, Val: uint64(0)},
|
||||
}},
|
||||
{structKey{"syz_missing_const_struct", "a1", DirInOut}, []Type{
|
||||
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "a0", ArgDir: DirInOut, IsOptional: false}, TypeSize: 4, BigEndian: false, BitfieldLen: 0}, Val: uint64(0)},
|
||||
}},
|
||||
{structKey{"syz_missing_const_struct", "a1", DirOut}, []Type{
|
||||
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "a0", ArgDir: DirOut, IsOptional: false}, TypeSize: 4, BigEndian: false, BitfieldLen: 0}, Val: uint64(0)},
|
||||
}},
|
||||
{structKey{"syz_recur_0", "", DirIn}, []Type{
|
||||
&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a0", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_0", "", DirIn})},
|
||||
}},
|
||||
@ -19350,6 +19371,18 @@ var structFields = []struct {
|
||||
getStruct(structKey{"syz_union2", "f0", DirOut}),
|
||||
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f1", ArgDir: DirOut, IsOptional: false}, TypeSize: 1, BigEndian: false, BitfieldLen: 0}},
|
||||
}},
|
||||
{structKey{"syz_use_missing", "", DirIn}, []Type{
|
||||
&ResourceType{TypeCommon: TypeCommon{TypeName: "syz_missing_const_res", FldName: "a0", ArgDir: DirIn, IsOptional: false}, Desc: resource("syz_missing_const_res")},
|
||||
getStruct(structKey{"syz_missing_const_struct", "a1", DirIn}),
|
||||
}},
|
||||
{structKey{"syz_use_missing", "", DirInOut}, []Type{
|
||||
&ResourceType{TypeCommon: TypeCommon{TypeName: "syz_missing_const_res", FldName: "a0", ArgDir: DirInOut, IsOptional: false}, Desc: resource("syz_missing_const_res")},
|
||||
getStruct(structKey{"syz_missing_const_struct", "a1", DirInOut}),
|
||||
}},
|
||||
{structKey{"syz_use_missing", "", DirOut}, []Type{
|
||||
&ResourceType{TypeCommon: TypeCommon{TypeName: "syz_missing_const_res", FldName: "a0", ArgDir: DirOut, IsOptional: false}, Desc: resource("syz_missing_const_res")},
|
||||
getStruct(structKey{"syz_missing_const_struct", "a1", DirOut}),
|
||||
}},
|
||||
{structKey{"syzn_devname", "", DirIn}, []Type{
|
||||
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "s", ArgDir: DirIn, IsOptional: false}, TypeSize: 1, BigEndian: false, BitfieldLen: 0}, Val: uint64(115)},
|
||||
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "y", ArgDir: DirIn, IsOptional: false}, TypeSize: 1, BigEndian: false, BitfieldLen: 0}, Val: uint64(121)},
|
||||
|
@ -696,6 +696,7 @@ var structArray = []Type{
|
||||
&StructType{TypeCommon: TypeCommon{TypeName: "syz_union1_struct", IsOptional: false}, packed: true},
|
||||
&UnionType{TypeCommon: TypeCommon{TypeName: "syz_union2", IsOptional: false}, varlen: true},
|
||||
&StructType{TypeCommon: TypeCommon{TypeName: "syz_union2_struct", IsOptional: false}, packed: true},
|
||||
&StructType{TypeCommon: TypeCommon{TypeName: "syz_use_missing", IsOptional: false}},
|
||||
&StructType{TypeCommon: TypeCommon{TypeName: "syzn_devname", IsOptional: false}},
|
||||
&StructType{TypeCommon: TypeCommon{TypeName: "tcp6_pair", IsOptional: false}},
|
||||
&StructType{TypeCommon: TypeCommon{TypeName: "tcp_eol_option", IsOptional: false}, packed: true},
|
||||
@ -19145,6 +19146,15 @@ var structFields = []struct {
|
||||
{structKey{"syz_missing_const_struct", "", DirOut}, []Type{
|
||||
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "a0", ArgDir: DirOut, IsOptional: false}, TypeSize: 4, BigEndian: false, BitfieldLen: 0}, Val: uint64(1075883694)},
|
||||
}},
|
||||
{structKey{"syz_missing_const_struct", "a1", DirIn}, []Type{
|
||||
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "a0", ArgDir: DirIn, IsOptional: false}, TypeSize: 4, BigEndian: false, BitfieldLen: 0}, Val: uint64(1075883694)},
|
||||
}},
|
||||
{structKey{"syz_missing_const_struct", "a1", DirInOut}, []Type{
|
||||
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "a0", ArgDir: DirInOut, IsOptional: false}, TypeSize: 4, BigEndian: false, BitfieldLen: 0}, Val: uint64(1075883694)},
|
||||
}},
|
||||
{structKey{"syz_missing_const_struct", "a1", DirOut}, []Type{
|
||||
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "a0", ArgDir: DirOut, IsOptional: false}, TypeSize: 4, BigEndian: false, BitfieldLen: 0}, Val: uint64(1075883694)},
|
||||
}},
|
||||
{structKey{"syz_recur_0", "", DirIn}, []Type{
|
||||
&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a0", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_0", "", DirIn})},
|
||||
}},
|
||||
@ -19361,6 +19371,18 @@ var structFields = []struct {
|
||||
getStruct(structKey{"syz_union2", "f0", DirOut}),
|
||||
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f1", ArgDir: DirOut, IsOptional: false}, TypeSize: 1, BigEndian: false, BitfieldLen: 0}},
|
||||
}},
|
||||
{structKey{"syz_use_missing", "", DirIn}, []Type{
|
||||
&ResourceType{TypeCommon: TypeCommon{TypeName: "syz_missing_const_res", FldName: "a0", ArgDir: DirIn, IsOptional: false}, Desc: resource("syz_missing_const_res")},
|
||||
getStruct(structKey{"syz_missing_const_struct", "a1", DirIn}),
|
||||
}},
|
||||
{structKey{"syz_use_missing", "", DirInOut}, []Type{
|
||||
&ResourceType{TypeCommon: TypeCommon{TypeName: "syz_missing_const_res", FldName: "a0", ArgDir: DirInOut, IsOptional: false}, Desc: resource("syz_missing_const_res")},
|
||||
getStruct(structKey{"syz_missing_const_struct", "a1", DirInOut}),
|
||||
}},
|
||||
{structKey{"syz_use_missing", "", DirOut}, []Type{
|
||||
&ResourceType{TypeCommon: TypeCommon{TypeName: "syz_missing_const_res", FldName: "a0", ArgDir: DirOut, IsOptional: false}, Desc: resource("syz_missing_const_res")},
|
||||
getStruct(structKey{"syz_missing_const_struct", "a1", DirOut}),
|
||||
}},
|
||||
{structKey{"syzn_devname", "", DirIn}, []Type{
|
||||
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "s", ArgDir: DirIn, IsOptional: false}, TypeSize: 1, BigEndian: false, BitfieldLen: 0}, Val: uint64(115)},
|
||||
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "y", ArgDir: DirIn, IsOptional: false}, TypeSize: 1, BigEndian: false, BitfieldLen: 0}, Val: uint64(121)},
|
||||
|
@ -696,6 +696,7 @@ var structArray = []Type{
|
||||
&StructType{TypeCommon: TypeCommon{TypeName: "syz_union1_struct", IsOptional: false}, packed: true},
|
||||
&UnionType{TypeCommon: TypeCommon{TypeName: "syz_union2", IsOptional: false}, varlen: true},
|
||||
&StructType{TypeCommon: TypeCommon{TypeName: "syz_union2_struct", IsOptional: false}, packed: true},
|
||||
&StructType{TypeCommon: TypeCommon{TypeName: "syz_use_missing", IsOptional: false}},
|
||||
&StructType{TypeCommon: TypeCommon{TypeName: "syzn_devname", IsOptional: false}},
|
||||
&StructType{TypeCommon: TypeCommon{TypeName: "tcp6_pair", IsOptional: false}},
|
||||
&StructType{TypeCommon: TypeCommon{TypeName: "tcp_eol_option", IsOptional: false}, packed: true},
|
||||
@ -19145,6 +19146,15 @@ var structFields = []struct {
|
||||
{structKey{"syz_missing_const_struct", "", DirOut}, []Type{
|
||||
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "a0", ArgDir: DirOut, IsOptional: false}, TypeSize: 4, BigEndian: false, BitfieldLen: 0}, Val: uint64(1075883694)},
|
||||
}},
|
||||
{structKey{"syz_missing_const_struct", "a1", DirIn}, []Type{
|
||||
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "a0", ArgDir: DirIn, IsOptional: false}, TypeSize: 4, BigEndian: false, BitfieldLen: 0}, Val: uint64(1075883694)},
|
||||
}},
|
||||
{structKey{"syz_missing_const_struct", "a1", DirInOut}, []Type{
|
||||
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "a0", ArgDir: DirInOut, IsOptional: false}, TypeSize: 4, BigEndian: false, BitfieldLen: 0}, Val: uint64(1075883694)},
|
||||
}},
|
||||
{structKey{"syz_missing_const_struct", "a1", DirOut}, []Type{
|
||||
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "a0", ArgDir: DirOut, IsOptional: false}, TypeSize: 4, BigEndian: false, BitfieldLen: 0}, Val: uint64(1075883694)},
|
||||
}},
|
||||
{structKey{"syz_recur_0", "", DirIn}, []Type{
|
||||
&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a0", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_0", "", DirIn})},
|
||||
}},
|
||||
@ -19361,6 +19371,18 @@ var structFields = []struct {
|
||||
getStruct(structKey{"syz_union2", "f0", DirOut}),
|
||||
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f1", ArgDir: DirOut, IsOptional: false}, TypeSize: 1, BigEndian: false, BitfieldLen: 0}},
|
||||
}},
|
||||
{structKey{"syz_use_missing", "", DirIn}, []Type{
|
||||
&ResourceType{TypeCommon: TypeCommon{TypeName: "syz_missing_const_res", FldName: "a0", ArgDir: DirIn, IsOptional: false}, Desc: resource("syz_missing_const_res")},
|
||||
getStruct(structKey{"syz_missing_const_struct", "a1", DirIn}),
|
||||
}},
|
||||
{structKey{"syz_use_missing", "", DirInOut}, []Type{
|
||||
&ResourceType{TypeCommon: TypeCommon{TypeName: "syz_missing_const_res", FldName: "a0", ArgDir: DirInOut, IsOptional: false}, Desc: resource("syz_missing_const_res")},
|
||||
getStruct(structKey{"syz_missing_const_struct", "a1", DirInOut}),
|
||||
}},
|
||||
{structKey{"syz_use_missing", "", DirOut}, []Type{
|
||||
&ResourceType{TypeCommon: TypeCommon{TypeName: "syz_missing_const_res", FldName: "a0", ArgDir: DirOut, IsOptional: false}, Desc: resource("syz_missing_const_res")},
|
||||
getStruct(structKey{"syz_missing_const_struct", "a1", DirOut}),
|
||||
}},
|
||||
{structKey{"syzn_devname", "", DirIn}, []Type{
|
||||
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "s", ArgDir: DirIn, IsOptional: false}, TypeSize: 1, BigEndian: false, BitfieldLen: 0}, Val: uint64(115)},
|
||||
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "y", ArgDir: DirIn, IsOptional: false}, TypeSize: 1, BigEndian: false, BitfieldLen: 0}, Val: uint64(121)},
|
||||
|
@ -85,6 +85,7 @@ var resourceArray = []*ResourceDesc{
|
||||
&ResourceDesc{Name: "sock_udp", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "resource-type", ArgDir: DirInOut, IsOptional: false}, TypeSize: 4, BigEndian: false, BitfieldLen: 0}}, Kind: []string{"fd", "sock", "sock_in", "sock_udp"}, Values: []uint64{0xffffffffffffffff, 18446744073709551516}},
|
||||
&ResourceDesc{Name: "sock_udp6", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "resource-type", ArgDir: DirInOut, IsOptional: false}, TypeSize: 4, BigEndian: false, BitfieldLen: 0}}, Kind: []string{"fd", "sock", "sock_in6", "sock_udp6"}, Values: []uint64{0xffffffffffffffff, 18446744073709551516}},
|
||||
&ResourceDesc{Name: "sock_unix", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "resource-type", ArgDir: DirInOut, IsOptional: false}, TypeSize: 4, BigEndian: false, BitfieldLen: 0}}, Kind: []string{"fd", "sock", "sock_unix"}, Values: []uint64{0xffffffffffffffff, 18446744073709551516}},
|
||||
&ResourceDesc{Name: "syz_missing_const_res", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "resource-type", ArgDir: DirInOut, IsOptional: false}, TypeSize: 4, BigEndian: false, BitfieldLen: 0}}, Kind: []string{"syz_missing_const_res"}, Values: []uint64{0}},
|
||||
&ResourceDesc{Name: "syz_res", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "resource-type", ArgDir: DirInOut, IsOptional: false}, TypeSize: 4, BigEndian: false, BitfieldLen: 0}}, Kind: []string{"syz_res"}, Values: []uint64{0xffff}},
|
||||
&ResourceDesc{Name: "tcp_seq_num", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "resource-type", ArgDir: DirInOut, IsOptional: false}, TypeSize: 4, BigEndian: false, BitfieldLen: 0}}, Kind: []string{"tcp_seq_num"}, Values: []uint64{0x42424242}},
|
||||
&ResourceDesc{Name: "te_session_id", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "resource-type", ArgDir: DirInOut, IsOptional: false}, TypeSize: 4, BigEndian: false, BitfieldLen: 0}}, Kind: []string{"te_session_id"}, Values: []uint64{0}},
|
||||
@ -681,6 +682,7 @@ var structArray = []Type{
|
||||
&StructType{TypeCommon: TypeCommon{TypeName: "syz_length_parent2_struct_inner_inner", IsOptional: false}},
|
||||
&StructType{TypeCommon: TypeCommon{TypeName: "syz_length_parent_struct", IsOptional: false}},
|
||||
&StructType{TypeCommon: TypeCommon{TypeName: "syz_length_vma_struct", IsOptional: false}},
|
||||
&StructType{TypeCommon: TypeCommon{TypeName: "syz_missing_const_struct", IsOptional: false}},
|
||||
&StructType{TypeCommon: TypeCommon{TypeName: "syz_recur_0", IsOptional: false}},
|
||||
&StructType{TypeCommon: TypeCommon{TypeName: "syz_recur_1", IsOptional: false}},
|
||||
&StructType{TypeCommon: TypeCommon{TypeName: "syz_recur_2", IsOptional: false}},
|
||||
@ -694,6 +696,7 @@ var structArray = []Type{
|
||||
&StructType{TypeCommon: TypeCommon{TypeName: "syz_union1_struct", IsOptional: false}, packed: true},
|
||||
&UnionType{TypeCommon: TypeCommon{TypeName: "syz_union2", IsOptional: false}, varlen: true},
|
||||
&StructType{TypeCommon: TypeCommon{TypeName: "syz_union2_struct", IsOptional: false}, packed: true},
|
||||
&StructType{TypeCommon: TypeCommon{TypeName: "syz_use_missing", IsOptional: false}},
|
||||
&StructType{TypeCommon: TypeCommon{TypeName: "syzn_devname", IsOptional: false}},
|
||||
&StructType{TypeCommon: TypeCommon{TypeName: "tcp6_pair", IsOptional: false}},
|
||||
&StructType{TypeCommon: TypeCommon{TypeName: "tcp_eol_option", IsOptional: false}, packed: true},
|
||||
@ -19134,6 +19137,24 @@ var structFields = []struct {
|
||||
&VmaType{TypeCommon: TypeCommon{TypeName: "vma", FldName: "f0", ArgDir: DirOut, IsOptional: false}, RangeBegin: 0, RangeEnd: 0},
|
||||
&LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "f1", ArgDir: DirOut, IsOptional: false}, TypeSize: 8, BigEndian: false, BitfieldLen: 0}, Buf: "f0", ByteSize: 0},
|
||||
}},
|
||||
{structKey{"syz_missing_const_struct", "", DirIn}, []Type{
|
||||
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "a0", ArgDir: DirIn, IsOptional: false}, TypeSize: 4, BigEndian: false, BitfieldLen: 0}, Val: uint64(0)},
|
||||
}},
|
||||
{structKey{"syz_missing_const_struct", "", DirInOut}, []Type{
|
||||
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "a0", ArgDir: DirInOut, IsOptional: false}, TypeSize: 4, BigEndian: false, BitfieldLen: 0}, Val: uint64(0)},
|
||||
}},
|
||||
{structKey{"syz_missing_const_struct", "", DirOut}, []Type{
|
||||
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "a0", ArgDir: DirOut, IsOptional: false}, TypeSize: 4, BigEndian: false, BitfieldLen: 0}, Val: uint64(0)},
|
||||
}},
|
||||
{structKey{"syz_missing_const_struct", "a1", DirIn}, []Type{
|
||||
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "a0", ArgDir: DirIn, IsOptional: false}, TypeSize: 4, BigEndian: false, BitfieldLen: 0}, Val: uint64(0)},
|
||||
}},
|
||||
{structKey{"syz_missing_const_struct", "a1", DirInOut}, []Type{
|
||||
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "a0", ArgDir: DirInOut, IsOptional: false}, TypeSize: 4, BigEndian: false, BitfieldLen: 0}, Val: uint64(0)},
|
||||
}},
|
||||
{structKey{"syz_missing_const_struct", "a1", DirOut}, []Type{
|
||||
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "a0", ArgDir: DirOut, IsOptional: false}, TypeSize: 4, BigEndian: false, BitfieldLen: 0}, Val: uint64(0)},
|
||||
}},
|
||||
{structKey{"syz_recur_0", "", DirIn}, []Type{
|
||||
&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a0", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_0", "", DirIn})},
|
||||
}},
|
||||
@ -19350,6 +19371,18 @@ var structFields = []struct {
|
||||
getStruct(structKey{"syz_union2", "f0", DirOut}),
|
||||
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f1", ArgDir: DirOut, IsOptional: false}, TypeSize: 1, BigEndian: false, BitfieldLen: 0}},
|
||||
}},
|
||||
{structKey{"syz_use_missing", "", DirIn}, []Type{
|
||||
&ResourceType{TypeCommon: TypeCommon{TypeName: "syz_missing_const_res", FldName: "a0", ArgDir: DirIn, IsOptional: false}, Desc: resource("syz_missing_const_res")},
|
||||
getStruct(structKey{"syz_missing_const_struct", "a1", DirIn}),
|
||||
}},
|
||||
{structKey{"syz_use_missing", "", DirInOut}, []Type{
|
||||
&ResourceType{TypeCommon: TypeCommon{TypeName: "syz_missing_const_res", FldName: "a0", ArgDir: DirInOut, IsOptional: false}, Desc: resource("syz_missing_const_res")},
|
||||
getStruct(structKey{"syz_missing_const_struct", "a1", DirInOut}),
|
||||
}},
|
||||
{structKey{"syz_use_missing", "", DirOut}, []Type{
|
||||
&ResourceType{TypeCommon: TypeCommon{TypeName: "syz_missing_const_res", FldName: "a0", ArgDir: DirOut, IsOptional: false}, Desc: resource("syz_missing_const_res")},
|
||||
getStruct(structKey{"syz_missing_const_struct", "a1", DirOut}),
|
||||
}},
|
||||
{structKey{"syzn_devname", "", DirIn}, []Type{
|
||||
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "s", ArgDir: DirIn, IsOptional: false}, TypeSize: 1, BigEndian: false, BitfieldLen: 0}, Val: uint64(115)},
|
||||
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "y", ArgDir: DirIn, IsOptional: false}, TypeSize: 1, BigEndian: false, BitfieldLen: 0}, Val: uint64(121)},
|
||||
|
@ -527,3 +527,8 @@ resource syz_missing_const_res[int32]: KVM_ARM_VCPU_INIT
|
||||
syz_missing_const_struct {
|
||||
a0 const[KVM_ARM_VCPU_INIT, int32]
|
||||
}
|
||||
|
||||
syz_use_missing {
|
||||
a0 syz_missing_const_res
|
||||
a1 syz_missing_const_struct
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user