From 03e0d245596b0276ea0cdc8efe6120f51653a713 Mon Sep 17 00:00:00 2001 From: Paul Chaignon Date: Tue, 17 Sep 2019 15:22:43 +0200 Subject: sys/linux: basic support for bpf-to-bpf function calls The BPF template currently only defines helper calls. BPF function calls (bpf-to-bpf calls) are however supported in Linux since v4.16. This patch defines bpf-to-bpf calls in the template. Signed-off-by: Paul Chaignon --- sys/linux/bpf.txt | 14 ++++++++++++-- sys/linux/bpf_amd64.const | 1 + sys/linux/bpf_arm64.const | 1 + sys/linux/bpf_ppc64le.const | 1 + sys/linux/gen/386.go | 14 +++++++++++--- sys/linux/gen/amd64.go | 15 ++++++++++++--- sys/linux/gen/arm.go | 14 +++++++++++--- sys/linux/gen/arm64.go | 15 ++++++++++++--- sys/linux/gen/ppc64le.go | 15 ++++++++++++--- 9 files changed, 73 insertions(+), 17 deletions(-) (limited to 'sys/linux') diff --git a/sys/linux/bpf.txt b/sys/linux/bpf.txt index f0b5ac964..26f011dbb 100644 --- a/sys/linux/bpf.txt +++ b/sys/linux/bpf.txt @@ -156,7 +156,8 @@ bpf_insn [ ldst bpf_insn_ldst alu bpf_insn_alu jmp bpf_insn_jmp - call bpf_insn_call + call bpf_insn_call_helper + func bpf_insn_call_func exit bpf_insn_exit initr0 bpf_insn_init_r0 map bpf_insn_map @@ -251,13 +252,22 @@ define BPF_JLE0 BPF_JLE >> 4 define BPF_JSLT0 BPF_JSLT >> 4 define BPF_JSLE0 BPF_JSLE >> 4 -bpf_insn_call { +bpf_insn_call_helper { code const[bpf_call_code, int8] regs const[0, int8] off const[0, int16] func int32[0:__BPF_FUNC_MAX_ID] } +bpf_insn_call_func { + code const[bpf_call_code, int8] + dst const[0, int8:4] + src const[BPF_PSEUDO_CALL, int8:4] + off const[0, int16] +# NEED: to limit the call offset to the program size, we'd need support for path expressions inside ranges of values. + func int32[-8:8] +} + define bpf_call_code BPF_JMP | BPF_CALL bpf_insn_exit { diff --git a/sys/linux/bpf_amd64.const b/sys/linux/bpf_amd64.const index 5dc99bcc3..f37388cfd 100644 --- a/sys/linux/bpf_amd64.const +++ b/sys/linux/bpf_amd64.const @@ -148,6 +148,7 @@ BPF_PROG_TYPE_SOCKET_FILTER = 1 BPF_PROG_TYPE_SOCK_OPS = 13 BPF_PROG_TYPE_TRACEPOINT = 5 BPF_PROG_TYPE_XDP = 6 +BPF_PSEUDO_CALL = 1 BPF_PSEUDO_MAP_FD = 1 BPF_PSEUDO_MAP_VALUE = 2 BPF_RAW_TRACEPOINT_OPEN = 17 diff --git a/sys/linux/bpf_arm64.const b/sys/linux/bpf_arm64.const index e4573e690..00ecd775b 100644 --- a/sys/linux/bpf_arm64.const +++ b/sys/linux/bpf_arm64.const @@ -148,6 +148,7 @@ BPF_PROG_TYPE_SOCKET_FILTER = 1 BPF_PROG_TYPE_SOCK_OPS = 13 BPF_PROG_TYPE_TRACEPOINT = 5 BPF_PROG_TYPE_XDP = 6 +BPF_PSEUDO_CALL = 1 BPF_PSEUDO_MAP_FD = 1 BPF_PSEUDO_MAP_VALUE = 2 BPF_RAW_TRACEPOINT_OPEN = 17 diff --git a/sys/linux/bpf_ppc64le.const b/sys/linux/bpf_ppc64le.const index 355ef459c..32af3cce8 100644 --- a/sys/linux/bpf_ppc64le.const +++ b/sys/linux/bpf_ppc64le.const @@ -148,6 +148,7 @@ BPF_PROG_TYPE_SOCKET_FILTER = 1 BPF_PROG_TYPE_SOCK_OPS = 13 BPF_PROG_TYPE_TRACEPOINT = 5 BPF_PROG_TYPE_XDP = 6 +BPF_PSEUDO_CALL = 1 BPF_PSEUDO_MAP_FD = 1 BPF_PSEUDO_MAP_VALUE = 2 BPF_RAW_TRACEPOINT_OPEN = 17 diff --git a/sys/linux/gen/386.go b/sys/linux/gen/386.go index d48976d1f..e7ae7ab82 100644 --- a/sys/linux/gen/386.go +++ b/sys/linux/gen/386.go @@ -1098,7 +1098,8 @@ var structDescs_386 = []*KeyedStruct{ &StructType{Key: StructKey{Name: "bpf_insn_ldst"}, FldName: "ldst"}, &StructType{Key: StructKey{Name: "bpf_insn_alu"}, FldName: "alu"}, &StructType{Key: StructKey{Name: "bpf_insn_jmp"}, FldName: "jmp"}, - &StructType{Key: StructKey{Name: "bpf_insn_call"}, FldName: "call"}, + &StructType{Key: StructKey{Name: "bpf_insn_call_helper"}, FldName: "call"}, + &StructType{Key: StructKey{Name: "bpf_insn_call_func"}, FldName: "func"}, &StructType{Key: StructKey{Name: "bpf_insn_exit"}, FldName: "exit"}, &StructType{Key: StructKey{Name: "bpf_insn_init_r0"}, FldName: "initr0"}, &StructType{Key: StructKey{Name: "bpf_insn_map"}, FldName: "map"}, @@ -1113,7 +1114,14 @@ var structDescs_386 = []*KeyedStruct{ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bpf_insn_offsets", FldName: "off", TypeSize: 2}}, Vals: []uint64{0, 1, 2, 4, 6, 8, 12, 16, 24, 32, 48, 64, 80, 128, 256, 18446744073709551615, 18446744073709551614, 18446744073709551612, 18446744073709551608, 18446744073709551604, 18446744073709551600, 18446744073709551584, 18446744073709551552}}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bpf_insn_immediates", FldName: "imm", TypeSize: 4}}, Vals: []uint64{0, 1, 4, 8, 16, 18446744073709551615, 18446744073709551612, 18446744073709551600}}, }}}, - {Key: StructKey{Name: "bpf_insn_call"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_insn_call", TypeSize: 8}, Fields: []Type{ + {Key: StructKey{Name: "bpf_insn_call_func"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_insn_call_func", TypeSize: 8}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "code", TypeSize: 1}}, Val: 133}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "dst", TypeSize: 1}, BitfieldLen: 4, BitfieldMdl: true}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "src", TypeSize: 1}, BitfieldOff: 4, BitfieldLen: 4}, Val: 1}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "off", TypeSize: 2}}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "func", TypeSize: 4}}, Kind: 2, RangeBegin: 18446744073709551608, RangeEnd: 8}, + }}}, + {Key: StructKey{Name: "bpf_insn_call_helper"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_insn_call_helper", TypeSize: 8}, Fields: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "code", TypeSize: 1}}, Val: 133}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "regs", TypeSize: 1}}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "off", TypeSize: 2}}}, @@ -52569,4 +52577,4 @@ var consts_386 = []ConstValue{ {Name: "bpf_insn_load_imm_dw", Value: 24}, } -const revision_386 = "0cf2e190168e6f07b1e6cf3b6e77c4ccd139c835" +const revision_386 = "06a46a2a7ae10127406f08f1ad94d9ec2a481cf0" diff --git a/sys/linux/gen/amd64.go b/sys/linux/gen/amd64.go index c4422b417..7f2883f14 100644 --- a/sys/linux/gen/amd64.go +++ b/sys/linux/gen/amd64.go @@ -1101,7 +1101,8 @@ var structDescs_amd64 = []*KeyedStruct{ &StructType{Key: StructKey{Name: "bpf_insn_ldst"}, FldName: "ldst"}, &StructType{Key: StructKey{Name: "bpf_insn_alu"}, FldName: "alu"}, &StructType{Key: StructKey{Name: "bpf_insn_jmp"}, FldName: "jmp"}, - &StructType{Key: StructKey{Name: "bpf_insn_call"}, FldName: "call"}, + &StructType{Key: StructKey{Name: "bpf_insn_call_helper"}, FldName: "call"}, + &StructType{Key: StructKey{Name: "bpf_insn_call_func"}, FldName: "func"}, &StructType{Key: StructKey{Name: "bpf_insn_exit"}, FldName: "exit"}, &StructType{Key: StructKey{Name: "bpf_insn_init_r0"}, FldName: "initr0"}, &StructType{Key: StructKey{Name: "bpf_insn_map"}, FldName: "map"}, @@ -1116,7 +1117,14 @@ var structDescs_amd64 = []*KeyedStruct{ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bpf_insn_offsets", FldName: "off", TypeSize: 2}}, Vals: []uint64{0, 1, 2, 4, 6, 8, 12, 16, 24, 32, 48, 64, 80, 128, 256, 18446744073709551615, 18446744073709551614, 18446744073709551612, 18446744073709551608, 18446744073709551604, 18446744073709551600, 18446744073709551584, 18446744073709551552}}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bpf_insn_immediates", FldName: "imm", TypeSize: 4}}, Vals: []uint64{0, 1, 4, 8, 16, 18446744073709551615, 18446744073709551612, 18446744073709551600}}, }}}, - {Key: StructKey{Name: "bpf_insn_call"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_insn_call", TypeSize: 8}, Fields: []Type{ + {Key: StructKey{Name: "bpf_insn_call_func"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_insn_call_func", TypeSize: 8}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "code", TypeSize: 1}}, Val: 133}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "dst", TypeSize: 1}, BitfieldLen: 4, BitfieldMdl: true}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "src", TypeSize: 1}, BitfieldOff: 4, BitfieldLen: 4}, Val: 1}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "off", TypeSize: 2}}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "func", TypeSize: 4}}, Kind: 2, RangeBegin: 18446744073709551608, RangeEnd: 8}, + }}}, + {Key: StructKey{Name: "bpf_insn_call_helper"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_insn_call_helper", TypeSize: 8}, Fields: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "code", TypeSize: 1}}, Val: 133}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "regs", TypeSize: 1}}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "off", TypeSize: 2}}}, @@ -45672,6 +45680,7 @@ var consts_amd64 = []ConstValue{ {Name: "BPF_PROG_TYPE_SOCK_OPS", Value: 13}, {Name: "BPF_PROG_TYPE_TRACEPOINT", Value: 5}, {Name: "BPF_PROG_TYPE_XDP", Value: 6}, + {Name: "BPF_PSEUDO_CALL", Value: 1}, {Name: "BPF_PSEUDO_MAP_FD", Value: 1}, {Name: "BPF_PSEUDO_MAP_VALUE", Value: 2}, {Name: "BPF_RAW_TRACEPOINT_OPEN", Value: 17}, @@ -53107,4 +53116,4 @@ var consts_amd64 = []ConstValue{ {Name: "bpf_insn_load_imm_dw", Value: 24}, } -const revision_amd64 = "aa246a28337c3712c3cb2b2da52b46f89c50ca77" +const revision_amd64 = "950641516b14e37a24b87f776843de39faa96b11" diff --git a/sys/linux/gen/arm.go b/sys/linux/gen/arm.go index 3edb6035b..4c7df5e48 100644 --- a/sys/linux/gen/arm.go +++ b/sys/linux/gen/arm.go @@ -1098,7 +1098,8 @@ var structDescs_arm = []*KeyedStruct{ &StructType{Key: StructKey{Name: "bpf_insn_ldst"}, FldName: "ldst"}, &StructType{Key: StructKey{Name: "bpf_insn_alu"}, FldName: "alu"}, &StructType{Key: StructKey{Name: "bpf_insn_jmp"}, FldName: "jmp"}, - &StructType{Key: StructKey{Name: "bpf_insn_call"}, FldName: "call"}, + &StructType{Key: StructKey{Name: "bpf_insn_call_helper"}, FldName: "call"}, + &StructType{Key: StructKey{Name: "bpf_insn_call_func"}, FldName: "func"}, &StructType{Key: StructKey{Name: "bpf_insn_exit"}, FldName: "exit"}, &StructType{Key: StructKey{Name: "bpf_insn_init_r0"}, FldName: "initr0"}, &StructType{Key: StructKey{Name: "bpf_insn_map"}, FldName: "map"}, @@ -1113,7 +1114,14 @@ var structDescs_arm = []*KeyedStruct{ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bpf_insn_offsets", FldName: "off", TypeSize: 2}}, Vals: []uint64{0, 1, 2, 4, 6, 8, 12, 16, 24, 32, 48, 64, 80, 128, 256, 18446744073709551615, 18446744073709551614, 18446744073709551612, 18446744073709551608, 18446744073709551604, 18446744073709551600, 18446744073709551584, 18446744073709551552}}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bpf_insn_immediates", FldName: "imm", TypeSize: 4}}, Vals: []uint64{0, 1, 4, 8, 16, 18446744073709551615, 18446744073709551612, 18446744073709551600}}, }}}, - {Key: StructKey{Name: "bpf_insn_call"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_insn_call", TypeSize: 8}, Fields: []Type{ + {Key: StructKey{Name: "bpf_insn_call_func"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_insn_call_func", TypeSize: 8}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "code", TypeSize: 1}}, Val: 133}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "dst", TypeSize: 1}, BitfieldLen: 4, BitfieldMdl: true}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "src", TypeSize: 1}, BitfieldOff: 4, BitfieldLen: 4}, Val: 1}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "off", TypeSize: 2}}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "func", TypeSize: 4}}, Kind: 2, RangeBegin: 18446744073709551608, RangeEnd: 8}, + }}}, + {Key: StructKey{Name: "bpf_insn_call_helper"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_insn_call_helper", TypeSize: 8}, Fields: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "code", TypeSize: 1}}, Val: 133}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "regs", TypeSize: 1}}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "off", TypeSize: 2}}}, @@ -52146,4 +52154,4 @@ var consts_arm = []ConstValue{ {Name: "bpf_insn_load_imm_dw", Value: 24}, } -const revision_arm = "d928c34e4aaf0fbd4da01cc7f5cdc97a4357a6ad" +const revision_arm = "0aa3c11bf6e076a37d71698c47ed1b7a357f24c6" diff --git a/sys/linux/gen/arm64.go b/sys/linux/gen/arm64.go index 826fe61ab..07bac9d4e 100644 --- a/sys/linux/gen/arm64.go +++ b/sys/linux/gen/arm64.go @@ -1101,7 +1101,8 @@ var structDescs_arm64 = []*KeyedStruct{ &StructType{Key: StructKey{Name: "bpf_insn_ldst"}, FldName: "ldst"}, &StructType{Key: StructKey{Name: "bpf_insn_alu"}, FldName: "alu"}, &StructType{Key: StructKey{Name: "bpf_insn_jmp"}, FldName: "jmp"}, - &StructType{Key: StructKey{Name: "bpf_insn_call"}, FldName: "call"}, + &StructType{Key: StructKey{Name: "bpf_insn_call_helper"}, FldName: "call"}, + &StructType{Key: StructKey{Name: "bpf_insn_call_func"}, FldName: "func"}, &StructType{Key: StructKey{Name: "bpf_insn_exit"}, FldName: "exit"}, &StructType{Key: StructKey{Name: "bpf_insn_init_r0"}, FldName: "initr0"}, &StructType{Key: StructKey{Name: "bpf_insn_map"}, FldName: "map"}, @@ -1116,7 +1117,14 @@ var structDescs_arm64 = []*KeyedStruct{ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bpf_insn_offsets", FldName: "off", TypeSize: 2}}, Vals: []uint64{0, 1, 2, 4, 6, 8, 12, 16, 24, 32, 48, 64, 80, 128, 256, 18446744073709551615, 18446744073709551614, 18446744073709551612, 18446744073709551608, 18446744073709551604, 18446744073709551600, 18446744073709551584, 18446744073709551552}}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bpf_insn_immediates", FldName: "imm", TypeSize: 4}}, Vals: []uint64{0, 1, 4, 8, 16, 18446744073709551615, 18446744073709551612, 18446744073709551600}}, }}}, - {Key: StructKey{Name: "bpf_insn_call"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_insn_call", TypeSize: 8}, Fields: []Type{ + {Key: StructKey{Name: "bpf_insn_call_func"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_insn_call_func", TypeSize: 8}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "code", TypeSize: 1}}, Val: 133}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "dst", TypeSize: 1}, BitfieldLen: 4, BitfieldMdl: true}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "src", TypeSize: 1}, BitfieldOff: 4, BitfieldLen: 4}, Val: 1}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "off", TypeSize: 2}}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "func", TypeSize: 4}}, Kind: 2, RangeBegin: 18446744073709551608, RangeEnd: 8}, + }}}, + {Key: StructKey{Name: "bpf_insn_call_helper"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_insn_call_helper", TypeSize: 8}, Fields: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "code", TypeSize: 1}}, Val: 133}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "regs", TypeSize: 1}}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "off", TypeSize: 2}}}, @@ -45118,6 +45126,7 @@ var consts_arm64 = []ConstValue{ {Name: "BPF_PROG_TYPE_SOCK_OPS", Value: 13}, {Name: "BPF_PROG_TYPE_TRACEPOINT", Value: 5}, {Name: "BPF_PROG_TYPE_XDP", Value: 6}, + {Name: "BPF_PSEUDO_CALL", Value: 1}, {Name: "BPF_PSEUDO_MAP_FD", Value: 1}, {Name: "BPF_PSEUDO_MAP_VALUE", Value: 2}, {Name: "BPF_RAW_TRACEPOINT_OPEN", Value: 17}, @@ -52459,4 +52468,4 @@ var consts_arm64 = []ConstValue{ {Name: "bpf_insn_load_imm_dw", Value: 24}, } -const revision_arm64 = "54ef3e7068bd04e03a35bba1769b88d9f7a4c0c1" +const revision_arm64 = "943716b9c4e173be4c989e89d2bcbf561ce53fae" diff --git a/sys/linux/gen/ppc64le.go b/sys/linux/gen/ppc64le.go index 61a6abee0..c97f16a2e 100644 --- a/sys/linux/gen/ppc64le.go +++ b/sys/linux/gen/ppc64le.go @@ -1100,7 +1100,8 @@ var structDescs_ppc64le = []*KeyedStruct{ &StructType{Key: StructKey{Name: "bpf_insn_ldst"}, FldName: "ldst"}, &StructType{Key: StructKey{Name: "bpf_insn_alu"}, FldName: "alu"}, &StructType{Key: StructKey{Name: "bpf_insn_jmp"}, FldName: "jmp"}, - &StructType{Key: StructKey{Name: "bpf_insn_call"}, FldName: "call"}, + &StructType{Key: StructKey{Name: "bpf_insn_call_helper"}, FldName: "call"}, + &StructType{Key: StructKey{Name: "bpf_insn_call_func"}, FldName: "func"}, &StructType{Key: StructKey{Name: "bpf_insn_exit"}, FldName: "exit"}, &StructType{Key: StructKey{Name: "bpf_insn_init_r0"}, FldName: "initr0"}, &StructType{Key: StructKey{Name: "bpf_insn_map"}, FldName: "map"}, @@ -1115,7 +1116,14 @@ var structDescs_ppc64le = []*KeyedStruct{ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bpf_insn_offsets", FldName: "off", TypeSize: 2}}, Vals: []uint64{0, 1, 2, 4, 6, 8, 12, 16, 24, 32, 48, 64, 80, 128, 256, 18446744073709551615, 18446744073709551614, 18446744073709551612, 18446744073709551608, 18446744073709551604, 18446744073709551600, 18446744073709551584, 18446744073709551552}}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bpf_insn_immediates", FldName: "imm", TypeSize: 4}}, Vals: []uint64{0, 1, 4, 8, 16, 18446744073709551615, 18446744073709551612, 18446744073709551600}}, }}}, - {Key: StructKey{Name: "bpf_insn_call"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_insn_call", TypeSize: 8}, Fields: []Type{ + {Key: StructKey{Name: "bpf_insn_call_func"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_insn_call_func", TypeSize: 8}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "code", TypeSize: 1}}, Val: 133}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "dst", TypeSize: 1}, BitfieldLen: 4, BitfieldMdl: true}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "src", TypeSize: 1}, BitfieldOff: 4, BitfieldLen: 4}, Val: 1}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "off", TypeSize: 2}}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "func", TypeSize: 4}}, Kind: 2, RangeBegin: 18446744073709551608, RangeEnd: 8}, + }}}, + {Key: StructKey{Name: "bpf_insn_call_helper"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_insn_call_helper", TypeSize: 8}, Fields: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "code", TypeSize: 1}}, Val: 133}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "regs", TypeSize: 1}}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "off", TypeSize: 2}}}, @@ -45112,6 +45120,7 @@ var consts_ppc64le = []ConstValue{ {Name: "BPF_PROG_TYPE_SOCK_OPS", Value: 13}, {Name: "BPF_PROG_TYPE_TRACEPOINT", Value: 5}, {Name: "BPF_PROG_TYPE_XDP", Value: 6}, + {Name: "BPF_PSEUDO_CALL", Value: 1}, {Name: "BPF_PSEUDO_MAP_FD", Value: 1}, {Name: "BPF_PSEUDO_MAP_VALUE", Value: 2}, {Name: "BPF_RAW_TRACEPOINT_OPEN", Value: 17}, @@ -52424,4 +52433,4 @@ var consts_ppc64le = []ConstValue{ {Name: "bpf_insn_load_imm_dw", Value: 24}, } -const revision_ppc64le = "2e9bda0f72a72f64202eedacac148f06bb443e11" +const revision_ppc64le = "9248c813f01d026ac73fe1a25838955c77f804d7" -- cgit mrf-deployment