aboutsummaryrefslogtreecommitdiffstats
path: root/sys/sys_arm.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2017-08-28 16:04:54 +0200
committerDmitry Vyukov <dvyukov@google.com>2017-08-28 16:04:54 +0200
commit0b652d72783d7fa432e357659b2b2ef4a140fa8a (patch)
treedda01c9495dfbff70f7970879bfb034bedd621c5 /sys/sys_arm.go
parent4074aed7c0c28afc7d4a3522045196c3f39b5208 (diff)
pkg/compiler: tolerate unsupported consts everywhere
Currently unsupported consts in structs and resources break build. However, that can well happen for arch-specific devices (e.g. Android). Make this non-fatal as it used to be.
Diffstat (limited to 'sys/sys_arm.go')
-rw-r--r--sys/sys_arm.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/sys/sys_arm.go b/sys/sys_arm.go
index ba643ccfb..72cce42ba 100644
--- a/sys/sys_arm.go
+++ b/sys/sys_arm.go
@@ -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{1075883694}},
&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}},
@@ -19134,6 +19136,15 @@ 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(1075883694)},
+ }},
+ {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(1075883694)},
+ }},
+ {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_recur_0", "", DirIn}, []Type{
&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a0", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_0", "", DirIn})},
}},