From 0108829095758774257301e06d38003c02aaae7f Mon Sep 17 00:00:00 2001 From: Shankara Pailoor Date: Tue, 8 Jan 2019 08:08:33 -0800 Subject: sys/linux: add rand_addr option to ipv6_addr union rand_addr option is the first option for the ipv6_addr union and is just an array of 16 bytes. This option makes it easy for trace2syz to convert ipv6 address as strace decodes the ipv6 address as a hex string. --- sys/linux/gen/386.go | 5 ++++- sys/linux/gen/amd64.go | 5 ++++- sys/linux/gen/arm.go | 5 ++++- sys/linux/gen/arm64.go | 5 ++++- sys/linux/gen/ppc64le.go | 5 ++++- sys/linux/vnet.txt | 1 + 6 files changed, 21 insertions(+), 5 deletions(-) (limited to 'sys/linux') diff --git a/sys/linux/gen/386.go b/sys/linux/gen/386.go index 56739d7fb..fbe0eaf09 100644 --- a/sys/linux/gen/386.go +++ b/sys/linux/gen/386.go @@ -8144,6 +8144,7 @@ var structDescs_386 = []*KeyedStruct{ &UnionType{Key: StructKey{Name: "tipc_packet"}, FldName: "tipc"}, }}}, {Key: StructKey{Name: "ipv6_addr"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "ipv6_addr", TypeSize: 16}, Fields: []Type{ + &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "rand_addr", TypeSize: 16}, Kind: 1, RangeBegin: 16, RangeEnd: 16}, &StructType{Key: StructKey{Name: "ipv6_addr_empty"}, FldName: "empty"}, &StructType{Key: StructKey{Name: "ipv6_addr_t[const[0xaa, int8]]"}, FldName: "local"}, &StructType{Key: StructKey{Name: "ipv6_addr_t[const[0xbb, int8]]"}, FldName: "remote"}, @@ -8155,6 +8156,7 @@ var structDescs_386 = []*KeyedStruct{ &StructType{Key: StructKey{Name: "ipv6_addr_multicast2"}, FldName: "mcast2"}, }}}, {Key: StructKey{Name: "ipv6_addr", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "ipv6_addr", TypeSize: 16, ArgDir: 1}, Fields: []Type{ + &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "rand_addr", TypeSize: 16, ArgDir: 1}, Kind: 1, RangeBegin: 16, RangeEnd: 16}, &StructType{Key: StructKey{Name: "ipv6_addr_empty", Dir: 1}, FldName: "empty"}, &StructType{Key: StructKey{Name: "ipv6_addr_t[const[0xaa, int8]]", Dir: 1}, FldName: "local"}, &StructType{Key: StructKey{Name: "ipv6_addr_t[const[0xbb, int8]]", Dir: 1}, FldName: "remote"}, @@ -8166,6 +8168,7 @@ var structDescs_386 = []*KeyedStruct{ &StructType{Key: StructKey{Name: "ipv6_addr_multicast2", Dir: 1}, FldName: "mcast2"}, }}}, {Key: StructKey{Name: "ipv6_addr", Dir: 2}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "ipv6_addr", TypeSize: 16, ArgDir: 2}, Fields: []Type{ + &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "rand_addr", TypeSize: 16, ArgDir: 2}, Kind: 1, RangeBegin: 16, RangeEnd: 16}, &StructType{Key: StructKey{Name: "ipv6_addr_empty", Dir: 2}, FldName: "empty"}, &StructType{Key: StructKey{Name: "ipv6_addr_t[const[0xaa, int8]]", Dir: 2}, FldName: "local"}, &StructType{Key: StructKey{Name: "ipv6_addr_t[const[0xbb, int8]]", Dir: 2}, FldName: "remote"}, @@ -46325,4 +46328,4 @@ var consts_386 = []ConstValue{ {Name: "bpf_insn_load_imm_dw", Value: 24}, } -const revision_386 = "d0fd3fdd82a32728ac18d6bef467709633b2d170" +const revision_386 = "65cd8b9bcd5fbf97b22da0164c90dc2727d0e8ec" diff --git a/sys/linux/gen/amd64.go b/sys/linux/gen/amd64.go index bf5d9b1a6..d66844bd5 100644 --- a/sys/linux/gen/amd64.go +++ b/sys/linux/gen/amd64.go @@ -8268,6 +8268,7 @@ var structDescs_amd64 = []*KeyedStruct{ &UnionType{Key: StructKey{Name: "tipc_packet"}, FldName: "tipc"}, }}}, {Key: StructKey{Name: "ipv6_addr"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "ipv6_addr", TypeSize: 16}, Fields: []Type{ + &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "rand_addr", TypeSize: 16}, Kind: 1, RangeBegin: 16, RangeEnd: 16}, &StructType{Key: StructKey{Name: "ipv6_addr_empty"}, FldName: "empty"}, &StructType{Key: StructKey{Name: "ipv6_addr_t[const[0xaa, int8]]"}, FldName: "local"}, &StructType{Key: StructKey{Name: "ipv6_addr_t[const[0xbb, int8]]"}, FldName: "remote"}, @@ -8279,6 +8280,7 @@ var structDescs_amd64 = []*KeyedStruct{ &StructType{Key: StructKey{Name: "ipv6_addr_multicast2"}, FldName: "mcast2"}, }}}, {Key: StructKey{Name: "ipv6_addr", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "ipv6_addr", TypeSize: 16, ArgDir: 1}, Fields: []Type{ + &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "rand_addr", TypeSize: 16, ArgDir: 1}, Kind: 1, RangeBegin: 16, RangeEnd: 16}, &StructType{Key: StructKey{Name: "ipv6_addr_empty", Dir: 1}, FldName: "empty"}, &StructType{Key: StructKey{Name: "ipv6_addr_t[const[0xaa, int8]]", Dir: 1}, FldName: "local"}, &StructType{Key: StructKey{Name: "ipv6_addr_t[const[0xbb, int8]]", Dir: 1}, FldName: "remote"}, @@ -8290,6 +8292,7 @@ var structDescs_amd64 = []*KeyedStruct{ &StructType{Key: StructKey{Name: "ipv6_addr_multicast2", Dir: 1}, FldName: "mcast2"}, }}}, {Key: StructKey{Name: "ipv6_addr", Dir: 2}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "ipv6_addr", TypeSize: 16, ArgDir: 2}, Fields: []Type{ + &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "rand_addr", TypeSize: 16, ArgDir: 2}, Kind: 1, RangeBegin: 16, RangeEnd: 16}, &StructType{Key: StructKey{Name: "ipv6_addr_empty", Dir: 2}, FldName: "empty"}, &StructType{Key: StructKey{Name: "ipv6_addr_t[const[0xaa, int8]]", Dir: 2}, FldName: "local"}, &StructType{Key: StructKey{Name: "ipv6_addr_t[const[0xbb, int8]]", Dir: 2}, FldName: "remote"}, @@ -47115,4 +47118,4 @@ var consts_amd64 = []ConstValue{ {Name: "bpf_insn_load_imm_dw", Value: 24}, } -const revision_amd64 = "6a0daeb52f444a447e8a4e8b7d910beee162a429" +const revision_amd64 = "aafa4b181846dfe8004a332f2b96df445302f306" diff --git a/sys/linux/gen/arm.go b/sys/linux/gen/arm.go index afdf03e5d..26e07e25c 100644 --- a/sys/linux/gen/arm.go +++ b/sys/linux/gen/arm.go @@ -8161,6 +8161,7 @@ var structDescs_arm = []*KeyedStruct{ &UnionType{Key: StructKey{Name: "tipc_packet"}, FldName: "tipc"}, }}}, {Key: StructKey{Name: "ipv6_addr"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "ipv6_addr", TypeSize: 16}, Fields: []Type{ + &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "rand_addr", TypeSize: 16}, Kind: 1, RangeBegin: 16, RangeEnd: 16}, &StructType{Key: StructKey{Name: "ipv6_addr_empty"}, FldName: "empty"}, &StructType{Key: StructKey{Name: "ipv6_addr_t[const[0xaa, int8]]"}, FldName: "local"}, &StructType{Key: StructKey{Name: "ipv6_addr_t[const[0xbb, int8]]"}, FldName: "remote"}, @@ -8172,6 +8173,7 @@ var structDescs_arm = []*KeyedStruct{ &StructType{Key: StructKey{Name: "ipv6_addr_multicast2"}, FldName: "mcast2"}, }}}, {Key: StructKey{Name: "ipv6_addr", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "ipv6_addr", TypeSize: 16, ArgDir: 1}, Fields: []Type{ + &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "rand_addr", TypeSize: 16, ArgDir: 1}, Kind: 1, RangeBegin: 16, RangeEnd: 16}, &StructType{Key: StructKey{Name: "ipv6_addr_empty", Dir: 1}, FldName: "empty"}, &StructType{Key: StructKey{Name: "ipv6_addr_t[const[0xaa, int8]]", Dir: 1}, FldName: "local"}, &StructType{Key: StructKey{Name: "ipv6_addr_t[const[0xbb, int8]]", Dir: 1}, FldName: "remote"}, @@ -8183,6 +8185,7 @@ var structDescs_arm = []*KeyedStruct{ &StructType{Key: StructKey{Name: "ipv6_addr_multicast2", Dir: 1}, FldName: "mcast2"}, }}}, {Key: StructKey{Name: "ipv6_addr", Dir: 2}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "ipv6_addr", TypeSize: 16, ArgDir: 2}, Fields: []Type{ + &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "rand_addr", TypeSize: 16, ArgDir: 2}, Kind: 1, RangeBegin: 16, RangeEnd: 16}, &StructType{Key: StructKey{Name: "ipv6_addr_empty", Dir: 2}, FldName: "empty"}, &StructType{Key: StructKey{Name: "ipv6_addr_t[const[0xaa, int8]]", Dir: 2}, FldName: "local"}, &StructType{Key: StructKey{Name: "ipv6_addr_t[const[0xbb, int8]]", Dir: 2}, FldName: "remote"}, @@ -46164,4 +46167,4 @@ var consts_arm = []ConstValue{ {Name: "bpf_insn_load_imm_dw", Value: 24}, } -const revision_arm = "ec20c4b8448d2c8d137faa2b8241fe2a3352b197" +const revision_arm = "004e9334bed4096aa64ffcd026b851c4cf701bb1" diff --git a/sys/linux/gen/arm64.go b/sys/linux/gen/arm64.go index 61cc06a02..b03ca338e 100644 --- a/sys/linux/gen/arm64.go +++ b/sys/linux/gen/arm64.go @@ -8268,6 +8268,7 @@ var structDescs_arm64 = []*KeyedStruct{ &UnionType{Key: StructKey{Name: "tipc_packet"}, FldName: "tipc"}, }}}, {Key: StructKey{Name: "ipv6_addr"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "ipv6_addr", TypeSize: 16}, Fields: []Type{ + &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "rand_addr", TypeSize: 16}, Kind: 1, RangeBegin: 16, RangeEnd: 16}, &StructType{Key: StructKey{Name: "ipv6_addr_empty"}, FldName: "empty"}, &StructType{Key: StructKey{Name: "ipv6_addr_t[const[0xaa, int8]]"}, FldName: "local"}, &StructType{Key: StructKey{Name: "ipv6_addr_t[const[0xbb, int8]]"}, FldName: "remote"}, @@ -8279,6 +8280,7 @@ var structDescs_arm64 = []*KeyedStruct{ &StructType{Key: StructKey{Name: "ipv6_addr_multicast2"}, FldName: "mcast2"}, }}}, {Key: StructKey{Name: "ipv6_addr", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "ipv6_addr", TypeSize: 16, ArgDir: 1}, Fields: []Type{ + &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "rand_addr", TypeSize: 16, ArgDir: 1}, Kind: 1, RangeBegin: 16, RangeEnd: 16}, &StructType{Key: StructKey{Name: "ipv6_addr_empty", Dir: 1}, FldName: "empty"}, &StructType{Key: StructKey{Name: "ipv6_addr_t[const[0xaa, int8]]", Dir: 1}, FldName: "local"}, &StructType{Key: StructKey{Name: "ipv6_addr_t[const[0xbb, int8]]", Dir: 1}, FldName: "remote"}, @@ -8290,6 +8292,7 @@ var structDescs_arm64 = []*KeyedStruct{ &StructType{Key: StructKey{Name: "ipv6_addr_multicast2", Dir: 1}, FldName: "mcast2"}, }}}, {Key: StructKey{Name: "ipv6_addr", Dir: 2}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "ipv6_addr", TypeSize: 16, ArgDir: 2}, Fields: []Type{ + &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "rand_addr", TypeSize: 16, ArgDir: 2}, Kind: 1, RangeBegin: 16, RangeEnd: 16}, &StructType{Key: StructKey{Name: "ipv6_addr_empty", Dir: 2}, FldName: "empty"}, &StructType{Key: StructKey{Name: "ipv6_addr_t[const[0xaa, int8]]", Dir: 2}, FldName: "local"}, &StructType{Key: StructKey{Name: "ipv6_addr_t[const[0xbb, int8]]", Dir: 2}, FldName: "remote"}, @@ -46473,4 +46476,4 @@ var consts_arm64 = []ConstValue{ {Name: "bpf_insn_load_imm_dw", Value: 24}, } -const revision_arm64 = "16500cf53c6e5300b353f1273d744bb95e971efd" +const revision_arm64 = "21c08b07f76fe332864139a874a2ff417b7875f8" diff --git a/sys/linux/gen/ppc64le.go b/sys/linux/gen/ppc64le.go index 5d9f95818..6264fef59 100644 --- a/sys/linux/gen/ppc64le.go +++ b/sys/linux/gen/ppc64le.go @@ -8246,6 +8246,7 @@ var structDescs_ppc64le = []*KeyedStruct{ &UnionType{Key: StructKey{Name: "tipc_packet"}, FldName: "tipc"}, }}}, {Key: StructKey{Name: "ipv6_addr"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "ipv6_addr", TypeSize: 16}, Fields: []Type{ + &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "rand_addr", TypeSize: 16}, Kind: 1, RangeBegin: 16, RangeEnd: 16}, &StructType{Key: StructKey{Name: "ipv6_addr_empty"}, FldName: "empty"}, &StructType{Key: StructKey{Name: "ipv6_addr_t[const[0xaa, int8]]"}, FldName: "local"}, &StructType{Key: StructKey{Name: "ipv6_addr_t[const[0xbb, int8]]"}, FldName: "remote"}, @@ -8257,6 +8258,7 @@ var structDescs_ppc64le = []*KeyedStruct{ &StructType{Key: StructKey{Name: "ipv6_addr_multicast2"}, FldName: "mcast2"}, }}}, {Key: StructKey{Name: "ipv6_addr", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "ipv6_addr", TypeSize: 16, ArgDir: 1}, Fields: []Type{ + &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "rand_addr", TypeSize: 16, ArgDir: 1}, Kind: 1, RangeBegin: 16, RangeEnd: 16}, &StructType{Key: StructKey{Name: "ipv6_addr_empty", Dir: 1}, FldName: "empty"}, &StructType{Key: StructKey{Name: "ipv6_addr_t[const[0xaa, int8]]", Dir: 1}, FldName: "local"}, &StructType{Key: StructKey{Name: "ipv6_addr_t[const[0xbb, int8]]", Dir: 1}, FldName: "remote"}, @@ -8268,6 +8270,7 @@ var structDescs_ppc64le = []*KeyedStruct{ &StructType{Key: StructKey{Name: "ipv6_addr_multicast2", Dir: 1}, FldName: "mcast2"}, }}}, {Key: StructKey{Name: "ipv6_addr", Dir: 2}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "ipv6_addr", TypeSize: 16, ArgDir: 2}, Fields: []Type{ + &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "rand_addr", TypeSize: 16, ArgDir: 2}, Kind: 1, RangeBegin: 16, RangeEnd: 16}, &StructType{Key: StructKey{Name: "ipv6_addr_empty", Dir: 2}, FldName: "empty"}, &StructType{Key: StructKey{Name: "ipv6_addr_t[const[0xaa, int8]]", Dir: 2}, FldName: "local"}, &StructType{Key: StructKey{Name: "ipv6_addr_t[const[0xbb, int8]]", Dir: 2}, FldName: "remote"}, @@ -43831,4 +43834,4 @@ var consts_ppc64le = []ConstValue{ {Name: "bpf_insn_load_imm_dw", Value: 24}, } -const revision_ppc64le = "f8640e48ef6a1bdd4d952bf06085fe942c32389b" +const revision_ppc64le = "45226d0873c554b3fc45a2a5fa466624dba47347" diff --git a/sys/linux/vnet.txt b/sys/linux/vnet.txt index 2e2532b69..01f0a4a5f 100644 --- a/sys/linux/vnet.txt +++ b/sys/linux/vnet.txt @@ -532,6 +532,7 @@ ipv6_addr_multicast2 { } [packed] ipv6_addr [ + rand_addr array[int8, 16] empty ipv6_addr_empty # These correspond to LOCAL_IPV6/REMOTE_IPV6/DEV_IPV6 in executor/common_linux.h local ipv6_addr_t[const[0xaa, int8]] -- cgit mrf-deployment