diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2019-01-25 16:10:00 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2019-01-25 16:10:00 +0100 |
| commit | a3d9f7e34dbad7e7c6804ee5107c3ddcf0bfef22 (patch) | |
| tree | 5520a26ab51407bc35d900a8ef77dd61158cfd76 /sys/linux/gen/arm.go | |
| parent | 6fde58c61bdd29262e5e1af69b65d3d3d4edf644 (diff) | |
sys/linux: fix up mptcp descriptions
1. Generate .const files for all arches.
2. Don't extract mptcp consts on android.
3. Remove mptcp includes from vnet.txt.
4. Enable CONFIG_MPTCP in syz-extract (mptcp is not like all other kernel headers).
Diffstat (limited to 'sys/linux/gen/arm.go')
| -rw-r--r-- | sys/linux/gen/arm.go | 52 |
1 files changed, 27 insertions, 25 deletions
diff --git a/sys/linux/gen/arm.go b/sys/linux/gen/arm.go index e9885189a..91d41b845 100644 --- a/sys/linux/gen/arm.go +++ b/sys/linux/gen/arm.go @@ -9584,16 +9584,16 @@ var structDescs_arm = []*KeyedStruct{ &StructType{Key: StructKey{Name: "llc_packet"}, FldName: "llc"}, }}}, {Key: StructKey{Name: "mptcp_ack_option"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "mptcp_ack_option", IsVarlen: true}, Fields: []Type{ - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "type", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "type", TypeSize: 1}}, Val: 30}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "length", TypeSize: 1}}, Buf: "parent"}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "reserved", TypeSize: 2}, BitfieldLen: 12, BitfieldMdl: true}}, - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "subtype", TypeSize: 2}, BitfieldOff: 12, BitfieldLen: 4}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "subtype", TypeSize: 2}, BitfieldOff: 12, BitfieldLen: 4}, Val: 4}, &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "mac", IsVarlen: true}, Kind: 1, RangeEnd: 20}, }}}, {Key: StructKey{Name: "mptcp_add_addr_option"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "mptcp_add_addr_option", IsVarlen: true}, Fields: []Type{ - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "type", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "type", TypeSize: 1}}, Val: 30}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "length", TypeSize: 1}}, Buf: "parent"}, - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "subtype", TypeSize: 1}, BitfieldLen: 4, BitfieldMdl: true}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "subtype", TypeSize: 1}, BitfieldLen: 4, BitfieldMdl: true}, Val: 32}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "version", TypeSize: 1}, BitfieldOff: 4, BitfieldLen: 4}, Buf: "parent"}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "addr_id", TypeSize: 1}}}, &UnionType{Key: StructKey{Name: "ipv4_addr"}, FldName: "address"}, @@ -9601,53 +9601,53 @@ var structDescs_arm = []*KeyedStruct{ &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "mac", IsVarlen: true}, Kind: 1, RangeEnd: 8}, }}}, {Key: StructKey{Name: "mptcp_capable_option"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "mptcp_capable_option", IsVarlen: true}, Fields: []Type{ - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "type", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "type", TypeSize: 1}}, Val: 30}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "length", TypeSize: 1}}, Buf: "parent"}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "version", TypeSize: 1}, BitfieldLen: 4, BitfieldMdl: true}}, - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "subtype", TypeSize: 1}, BitfieldOff: 4, BitfieldLen: 4}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "subtype", TypeSize: 1}, BitfieldOff: 4, BitfieldLen: 4}, Val: 8}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "flags", TypeSize: 1}}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64be", FldName: "sender", TypeSize: 8}, ArgFormat: 1}}, &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "receiver", IsVarlen: true}, Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64be", TypeSize: 8}, ArgFormat: 1}}, Kind: 1, RangeEnd: 1}, }}}, {Key: StructKey{Name: "mptcp_generic_option"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "mptcp_generic_option", IsVarlen: true}, Fields: []Type{ - &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "mptcp_sub_types", FldName: "type", TypeSize: 1}}}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "mptcp_sub_types", FldName: "type", TypeSize: 1}}, Vals: []uint64{1, 2, 4, 8, 32, 64, 128, 256}, BitMask: true}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "length", TypeSize: 1}}, Buf: "parent"}, &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "data", IsVarlen: true}, Kind: 1, RangeEnd: 16}, }}}, {Key: StructKey{Name: "mptcp_mp_fclose_option"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "mptcp_mp_fclose_option", TypeSize: 12}, Fields: []Type{ - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "type", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "type", TypeSize: 1}}, Val: 30}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "length", TypeSize: 1}}, Buf: "parent"}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "reserved", TypeSize: 2}, BitfieldLen: 12, BitfieldMdl: true}}, - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "subtype", TypeSize: 2}, BitfieldOff: 12, BitfieldLen: 4}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "subtype", TypeSize: 2}, BitfieldOff: 12, BitfieldLen: 4}, Val: 128}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "key", TypeSize: 8}}}, }}}, {Key: StructKey{Name: "mptcp_mp_join_option"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "mptcp_mp_join_option", TypeSize: 3}, Fields: []Type{ - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "type", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "type", TypeSize: 1}}, Val: 30}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "length", TypeSize: 1}}, Buf: "parent"}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "flags", TypeSize: 1}, BitfieldLen: 4, BitfieldMdl: true}}, - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "subtype", TypeSize: 1}, BitfieldOff: 4, BitfieldLen: 4}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "subtype", TypeSize: 1}, BitfieldOff: 4, BitfieldLen: 4}, Val: 64}, }}}, {Key: StructKey{Name: "mptcp_remove_addr_option"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "mptcp_remove_addr_option", IsVarlen: true}, Fields: []Type{ - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "type", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "type", TypeSize: 1}}, Val: 30}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "length", TypeSize: 1}}, Buf: "parent"}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "reserved", TypeSize: 1}, BitfieldLen: 4, BitfieldMdl: true}}, - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "subtype", TypeSize: 1}, BitfieldOff: 4, BitfieldLen: 4}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "subtype", TypeSize: 1}, BitfieldOff: 4, BitfieldLen: 4}, Val: 256}, &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "addrs_id", IsVarlen: true}}, }}}, {Key: StructKey{Name: "mptcp_syn_option"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "mptcp_syn_option", TypeSize: 12}, Fields: []Type{ - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "type", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "type", TypeSize: 1}}, Val: 30}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "length", TypeSize: 1}}, Buf: "parent"}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "flags", TypeSize: 1}, BitfieldLen: 4, BitfieldMdl: true}}, - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "subtype", TypeSize: 1}, BitfieldOff: 4, BitfieldLen: 4}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "subtype", TypeSize: 1}, BitfieldOff: 4, BitfieldLen: 4}, Val: 1}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "addr_id", TypeSize: 1}}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "token", TypeSize: 4}}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "nonce", TypeSize: 4}}}, }}}, {Key: StructKey{Name: "mptcp_synack_option"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "mptcp_synack_option", TypeSize: 16}, Fields: []Type{ - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "type", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "type", TypeSize: 1}}, Val: 30}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "length", TypeSize: 1}}, Buf: "parent"}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "flags", TypeSize: 1}, BitfieldLen: 4, BitfieldMdl: true}}, - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "subtype", TypeSize: 1}, BitfieldOff: 4, BitfieldLen: 4}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "subtype", TypeSize: 1}, BitfieldOff: 4, BitfieldLen: 4}, Val: 2}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "addr_id", TypeSize: 1}}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "mac", TypeSize: 8}}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "nonce", TypeSize: 4}}}, @@ -33746,12 +33746,6 @@ var syscalls_arm = []*Syscall{ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "name", TypeSize: 4}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "string", IsVarlen: true}, Kind: 2}}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "memfd_flags", FldName: "flags", TypeSize: 4}}, Vals: []uint64{1, 2, 4}, BitMask: true}, }, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_memfd", FldName: "ret", TypeSize: 4, ArgDir: 1}}}, - {NR: 400, Name: "migrate_pages", CallName: "migrate_pages", Args: []Type{ - &ResourceType{TypeCommon: TypeCommon{TypeName: "pid", FldName: "pid", TypeSize: 4}}, - &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "maxnode", TypeSize: 4}}}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "old", TypeSize: 4}, Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", TypeSize: 8}}}}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "new", TypeSize: 4}, Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", TypeSize: 8}}}}, - }}, {NR: 219, Name: "mincore", CallName: "mincore", Args: []Type{ &VmaType{TypeCommon: TypeCommon{TypeName: "vma", FldName: "addr", TypeSize: 4}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "size", TypeSize: 4}}, Buf: "addr"}, @@ -43051,6 +43045,14 @@ var consts_arm = []ConstValue{ {Name: "N_NULL", Value: 27}, {Name: "N_TTY"}, {Name: "OMAGIC", Value: 263}, + {Name: "OPTION_ADD_ADDR", Value: 32}, + {Name: "OPTION_MP_CAPABLE", Value: 8}, + {Name: "OPTION_MP_FCLOSE", Value: 128}, + {Name: "OPTION_MP_JOIN", Value: 64}, + {Name: "OPTION_REMOVE_ADDR", Value: 256}, + {Name: "OPTION_TYPE_ACK", Value: 4}, + {Name: "OPTION_TYPE_SYN", Value: 1}, + {Name: "OPTION_TYPE_SYNACK", Value: 2}, {Name: "OVL_FH_FLAG_ANY_ENDIAN", Value: 2}, {Name: "OVL_FH_FLAG_BIG_ENDIAN", Value: 1}, {Name: "OVL_FH_FLAG_PATH_UPPER", Value: 4}, @@ -44901,6 +44903,7 @@ var consts_arm = []ConstValue{ {Name: "TCPOPT_FASTOPEN", Value: 34}, {Name: "TCPOPT_FASTOPEN_MAGIC", Value: 63881}, {Name: "TCPOPT_MD5SIG", Value: 19}, + {Name: "TCPOPT_MPTCP", Value: 30}, {Name: "TCPOPT_MSS", Value: 2}, {Name: "TCPOPT_NOP", Value: 1}, {Name: "TCPOPT_SACK", Value: 5}, @@ -46829,7 +46832,6 @@ var consts_arm = []ConstValue{ {Name: "__NR_mbind", Value: 319}, {Name: "__NR_membarrier", Value: 389}, {Name: "__NR_memfd_create", Value: 385}, - {Name: "__NR_migrate_pages", Value: 400}, {Name: "__NR_mincore", Value: 219}, {Name: "__NR_mkdir", Value: 39}, {Name: "__NR_mkdirat", Value: 323}, @@ -47007,4 +47009,4 @@ var consts_arm = []ConstValue{ {Name: "bpf_insn_load_imm_dw", Value: 24}, } -const revision_arm = "aff7ac2133fd3d4e7bcfc917ab5b065eea6b513d" +const revision_arm = "5dd0744dbc7da7bf396e594b93666959a0dfb8ab" |
