From c25d74ee514fe00f228a0cc7c158cf2906329ea8 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Fri, 29 Dec 2017 17:24:21 +0100 Subject: sys/linux: improve bpf descriptions --- sys/linux/amd64.go | 160 +++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 144 insertions(+), 16 deletions(-) (limited to 'sys/linux/amd64.go') diff --git a/sys/linux/amd64.go b/sys/linux/amd64.go index c5a119a41..62ab92515 100644 --- a/sys/linux/amd64.go +++ b/sys/linux/amd64.go @@ -375,12 +375,11 @@ var structDescs_amd64 = []*KeyedStruct{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 4}}, IsPad: true}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "ci", TypeSize: 8}, Type: &ArrayType{TypeCommon: TypeCommon{TypeName: "array", ArgDir: 1}, Type: &StructType{Key: StructKey{Name: "bnep_conninfo", Dir: 1}}}}, }}}, - {Key: StructKey{Name: "bpf_attach_arg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_attach_arg", TypeSize: 20}, Fields: []Type{ - &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "target", TypeSize: 4}}, - &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_bpf_prog", FldName: "prog", TypeSize: 4}}, + {Key: StructKey{Name: "bpf_attach_arg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_attach_arg", TypeSize: 16}, Fields: []Type{ + &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "target_fd", TypeSize: 4}}, + &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_bpf_prog", FldName: "attach_bpf_fd", TypeSize: 4}}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bpf_attach_type", FldName: "type", TypeSize: 4}}, Vals: []uint64{0, 1, 2, 3, 4, 5, 6}}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bpf_attach_flags", FldName: "flags", TypeSize: 4}}, Vals: []uint64{1, 2}}, - &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_bpf_prog", FldName: "prog2", TypeSize: 4}}, }}}, {Key: StructKey{Name: "bpf_detach_arg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_detach_arg", TypeSize: 20}, Fields: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "target", TypeSize: 4}}}, @@ -389,6 +388,11 @@ var structDescs_amd64 = []*KeyedStruct{ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bpf_attach_flags", FldName: "flags", TypeSize: 4}}, Vals: []uint64{1, 2}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "prog2", TypeSize: 4}}}, }}}, + {Key: StructKey{Name: "bpf_framed_program"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_framed_program"}, Fields: []Type{ + &StructType{Key: StructKey{Name: "bpf_insn_init_r0"}, FldName: "initr0"}, + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "body"}, Type: &UnionType{Key: StructKey{Name: "bpf_insn"}}}, + &StructType{Key: StructKey{Name: "bpf_insn_exit"}, FldName: "exit"}, + }}}, {Key: StructKey{Name: "bpf_get_map_info_arg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_get_map_info_arg", TypeSize: 16}, Fields: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_bpf_map", FldName: "prog", TypeSize: 4}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "len", TypeSize: 4}}, Buf: "info"}, @@ -399,21 +403,86 @@ var structDescs_amd64 = []*KeyedStruct{ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "len", TypeSize: 4}}, Buf: "info"}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "info", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "bpf_prog_info", Dir: 1}}}, }}}, - {Key: StructKey{Name: "bpf_insn"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_insn", TypeSize: 8}, Fields: []Type{ + {Key: StructKey{Name: "bpf_insn"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_insn", TypeSize: 16}, Fields: []Type{ &StructType{Key: StructKey{Name: "bpf_insn_generic"}, FldName: "generic"}, + &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_exit"}, FldName: "exit"}, + &StructType{Key: StructKey{Name: "bpf_insn_init_r0"}, FldName: "initr0"}, &StructType{Key: StructKey{Name: "bpf_insn_map"}, FldName: "map"}, }}}, + {Key: StructKey{Name: "bpf_insn_alu"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_insn_alu", TypeSize: 8}, Fields: []Type{ + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bpf_alu_insn", FldName: "code_class", TypeSize: 1}, BitfieldLen: 3, BitfieldMdl: true}, Vals: []uint64{4, 7}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "code_s", TypeSize: 1}, BitfieldOff: 3, BitfieldLen: 1, BitfieldMdl: true}}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bpf_alu_op", FldName: "code_op", TypeSize: 1}, BitfieldOff: 4, BitfieldLen: 4}, Vals: []uint64{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13}}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bpf_reg", FldName: "dst", TypeSize: 1}, BitfieldLen: 4, BitfieldMdl: true}, Vals: []uint64{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bpf_reg", FldName: "src", TypeSize: 1}, BitfieldOff: 4, BitfieldLen: 4}, Vals: []uint64{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}}, + &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, 4294967295, 4294967294, 4294967292, 4294967288, 4294967284, 4294967280, 4294967232}}, + &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{ + &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}}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "func", TypeSize: 4}}, Kind: 2, RangeEnd: 58}, + }}}, + {Key: StructKey{Name: "bpf_insn_exit"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_insn_exit", TypeSize: 8}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "code", TypeSize: 1}}, Val: 149}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "regs", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "off", TypeSize: 2}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "imm", TypeSize: 4}}}, + }}}, {Key: StructKey{Name: "bpf_insn_generic"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_insn_generic", TypeSize: 8}, Fields: []Type{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "code", TypeSize: 1}}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "regs", TypeSize: 1}}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "off", TypeSize: 2}}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "imm", TypeSize: 4}}}, }}}, - {Key: StructKey{Name: "bpf_insn_map"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_insn_map", TypeSize: 8}, Fields: []Type{ - &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "code", TypeSize: 1}}}, - &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "regs", TypeSize: 1}}}, - &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "off", TypeSize: 2}}}, + {Key: StructKey{Name: "bpf_insn_init_r0"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_insn_init_r0", TypeSize: 16}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "code", TypeSize: 1}}, Val: 24}, + &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}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "off", TypeSize: 2}}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "imm", TypeSize: 4}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "code2", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "regs2", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "off2", TypeSize: 2}}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "imm2", TypeSize: 4}}}, + }}}, + {Key: StructKey{Name: "bpf_insn_jmp"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_insn_jmp", TypeSize: 8}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "code_class", TypeSize: 1}, BitfieldLen: 3, BitfieldMdl: true}, Val: 5}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "code_s", TypeSize: 1}, BitfieldOff: 3, BitfieldLen: 1, BitfieldMdl: true}}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bpf_jmp_op", FldName: "code_op", TypeSize: 1}, BitfieldOff: 4, BitfieldLen: 4}, Vals: []uint64{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13}}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bpf_reg", FldName: "dst", TypeSize: 1}, BitfieldLen: 4, BitfieldMdl: true}, Vals: []uint64{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bpf_reg", FldName: "src", TypeSize: 1}, BitfieldOff: 4, BitfieldLen: 4}, Vals: []uint64{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}}, + &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, 4294967295, 4294967294, 4294967292, 4294967288, 4294967284, 4294967280, 4294967232}}, + &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_ldst"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_insn_ldst", TypeSize: 8}, Fields: []Type{ + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bpf_ldst_insn", FldName: "code_class", TypeSize: 1}, BitfieldLen: 3, BitfieldMdl: true}, Vals: []uint64{0, 1, 2, 3}}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bpf_ldst_size", FldName: "code_size", TypeSize: 1}, BitfieldOff: 3, BitfieldLen: 2, BitfieldMdl: true}, Vals: []uint64{0, 1, 2, 3}}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bpf_ldst_mode", FldName: "code_mode", TypeSize: 1}, BitfieldOff: 5, BitfieldLen: 3}, Vals: []uint64{0, 1, 2, 3, 6}}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bpf_reg", FldName: "dst", TypeSize: 1}, BitfieldLen: 4, BitfieldMdl: true}, Vals: []uint64{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bpf_reg", FldName: "src", TypeSize: 1}, BitfieldOff: 4, BitfieldLen: 4}, Vals: []uint64{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}}, + &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, 4294967295, 4294967294, 4294967292, 4294967288, 4294967284, 4294967280, 4294967232}}, + &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_map"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_insn_map", TypeSize: 16}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "code", TypeSize: 1}}, Val: 24}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bpf_reg", FldName: "dst", TypeSize: 1}, BitfieldLen: 4, BitfieldMdl: true}, Vals: []uint64{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}}, + &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}}}, &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_bpf_map", FldName: "imm", TypeSize: 4}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "code2", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "regs2", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "off2", TypeSize: 2}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "imm2", TypeSize: 4}}}, + }}}, + {Key: StructKey{Name: "bpf_instructions"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_instructions"}, Fields: []Type{ + &StructType{Key: StructKey{Name: "bpf_framed_program"}, FldName: "framed"}, + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "raw"}, Type: &UnionType{Key: StructKey{Name: "bpf_insn"}}}, }}}, {Key: StructKey{Name: "bpf_map_create_arg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_map_create_arg", TypeSize: 44}, Fields: []Type{ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bpf_map_type", FldName: "type", TypeSize: 4}}, Vals: []uint64{1, 2, 3, 4, 7, 8, 5, 6, 9, 10, 11, 12, 13, 14, 15, 16}}, @@ -478,16 +547,16 @@ var structDescs_amd64 = []*KeyedStruct{ }}}, {Key: StructKey{Name: "bpf_prog"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_prog", TypeSize: 72}, Fields: []Type{ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bpf_prog_type", FldName: "type", TypeSize: 4}}, Vals: []uint64{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}}, - &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "ninsn", TypeSize: 4}}, Buf: "insns"}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "insns", TypeSize: 8}, Type: &ArrayType{TypeCommon: TypeCommon{TypeName: "array"}, Type: &UnionType{Key: StructKey{Name: "bpf_insn"}}}}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "license", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "string"}, Kind: 2}}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize8", FldName: "ninsn", TypeSize: 4}}, ByteSize: 8, Buf: "insns"}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "insns", TypeSize: 8}, Type: &UnionType{Key: StructKey{Name: "bpf_instructions"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "license", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "string"}, Kind: 2, SubKind: "bpf_licenses", Values: []string{"GPL\x00", "syzkaller\x00"}}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "loglev", TypeSize: 4}}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "logsize", TypeSize: 4}}, Buf: "log"}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "log", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", ArgDir: 1}}}, - &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "kver", TypeSize: 4}}}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bpf_kern_version", FldName: "kern_version", TypeSize: 4}}, Vals: []uint64{265984, 266240, 266496}}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bpf_prog_load_flags", FldName: "flags", TypeSize: 4}}, Vals: []uint64{1}}, &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "prog_name", TypeSize: 16}, Type: &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", TypeSize: 1}}}, Kind: 1, RangeBegin: 16, RangeEnd: 16}, - &ResourceType{TypeCommon: TypeCommon{TypeName: "ifindex", FldName: "prog_ifindex", TypeSize: 4}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "prog_ifindex", TypeSize: 4}}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 4}}, IsPad: true}, }}}, {Key: StructKey{Name: "bpf_prog_info", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_prog_info", TypeSize: 80, ArgDir: 1}, Fields: []Type{ @@ -515,7 +584,7 @@ var structDescs_amd64 = []*KeyedStruct{ }, AlignAttr: 8}}, {Key: StructKey{Name: "bpf_test_prog_arg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_test_prog_arg", TypeSize: 40}, Fields: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_bpf_prog", FldName: "prog", TypeSize: 4}}, - &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "retval", TypeSize: 4}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "retval", TypeSize: 4}}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "insize", TypeSize: 4}}, Buf: "indata"}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "outsize", TypeSize: 4}}, Buf: "outdata"}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "indata", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array"}}}, @@ -14573,13 +14642,25 @@ var consts_amd64 = []ConstValue{ {Name: "BNEPGETCONNINFO", Value: 2147762899}, {Name: "BNEPGETCONNLIST", Value: 2147762898}, {Name: "BNEPGETSUPPFEAT", Value: 2147762900}, + {Name: "BPF_ABS0", Value: 1}, + {Name: "BPF_ADD0"}, + {Name: "BPF_ALU", Value: 4}, + {Name: "BPF_ALU64", Value: 7}, + {Name: "BPF_AND0", Value: 5}, {Name: "BPF_ANY"}, + {Name: "BPF_ARSH0", Value: 12}, + {Name: "BPF_B0", Value: 2}, + {Name: "BPF_CALL0", Value: 8}, {Name: "BPF_CGROUP_DEVICE", Value: 6}, {Name: "BPF_CGROUP_INET_EGRESS", Value: 1}, {Name: "BPF_CGROUP_INET_INGRESS"}, {Name: "BPF_CGROUP_INET_SOCK_CREATE", Value: 2}, {Name: "BPF_CGROUP_SOCK_OPS", Value: 3}, + {Name: "BPF_DIV0", Value: 3}, + {Name: "BPF_DW0", Value: 3}, + {Name: "BPF_END0", Value: 13}, {Name: "BPF_EXIST", Value: 2}, + {Name: "BPF_EXIT0", Value: 9}, {Name: "BPF_F_ALLOW_MULTI", Value: 2}, {Name: "BPF_F_ALLOW_OVERRIDE", Value: 1}, {Name: "BPF_F_NO_COMMON_LRU", Value: 2}, @@ -14589,6 +14670,25 @@ var consts_amd64 = []ConstValue{ {Name: "BPF_F_RDONLY", Value: 8}, {Name: "BPF_F_STRICT_ALIGNMENT", Value: 1}, {Name: "BPF_F_WRONLY", Value: 16}, + {Name: "BPF_H0", Value: 1}, + {Name: "BPF_IMM0"}, + {Name: "BPF_IND0", Value: 2}, + {Name: "BPF_JA0"}, + {Name: "BPF_JEQ0", Value: 1}, + {Name: "BPF_JGE0", Value: 3}, + {Name: "BPF_JGT0", Value: 2}, + {Name: "BPF_JLE0", Value: 11}, + {Name: "BPF_JLT0", Value: 10}, + {Name: "BPF_JMP", Value: 5}, + {Name: "BPF_JNE0", Value: 5}, + {Name: "BPF_JSET0", Value: 4}, + {Name: "BPF_JSGE0", Value: 7}, + {Name: "BPF_JSGT0", Value: 6}, + {Name: "BPF_JSLE0", Value: 13}, + {Name: "BPF_JSLT0", Value: 12}, + {Name: "BPF_LD"}, + {Name: "BPF_LDX", Value: 1}, + {Name: "BPF_LSH0", Value: 6}, {Name: "BPF_MAP_CREATE"}, {Name: "BPF_MAP_DELETE_ELEM", Value: 3}, {Name: "BPF_MAP_GET_FD_BY_ID", Value: 14}, @@ -14612,11 +14712,17 @@ var consts_amd64 = []ConstValue{ {Name: "BPF_MAP_TYPE_SOCKMAP", Value: 15}, {Name: "BPF_MAP_TYPE_STACK_TRACE", Value: 7}, {Name: "BPF_MAP_UPDATE_ELEM", Value: 2}, + {Name: "BPF_MEM0", Value: 3}, + {Name: "BPF_MOD0", Value: 9}, + {Name: "BPF_MOV0", Value: 11}, + {Name: "BPF_MUL0", Value: 2}, + {Name: "BPF_NEG0", Value: 8}, {Name: "BPF_NOEXIST", Value: 1}, {Name: "BPF_OBJ_GET", Value: 7}, {Name: "BPF_OBJ_GET_INFO_BY_FD", Value: 15}, {Name: "BPF_OBJ_NAME_LEN", Value: 16}, {Name: "BPF_OBJ_PIN", Value: 6}, + {Name: "BPF_OR0", Value: 4}, {Name: "BPF_PROG_ATTACH", Value: 8}, {Name: "BPF_PROG_DETACH", Value: 9}, {Name: "BPF_PROG_GET_FD_BY_ID", Value: 13}, @@ -14640,8 +14746,26 @@ var consts_amd64 = []ConstValue{ {Name: "BPF_PROG_TYPE_TRACEPOINT", Value: 5}, {Name: "BPF_PROG_TYPE_XDP", Value: 6}, {Name: "BPF_PSEUDO_MAP_FD", Value: 1}, + {Name: "BPF_REG_0"}, + {Name: "BPF_REG_1", Value: 1}, + {Name: "BPF_REG_10", Value: 10}, + {Name: "BPF_REG_2", Value: 2}, + {Name: "BPF_REG_3", Value: 3}, + {Name: "BPF_REG_4", Value: 4}, + {Name: "BPF_REG_5", Value: 5}, + {Name: "BPF_REG_6", Value: 6}, + {Name: "BPF_REG_7", Value: 7}, + {Name: "BPF_REG_8", Value: 8}, + {Name: "BPF_REG_9", Value: 9}, + {Name: "BPF_RSH0", Value: 7}, {Name: "BPF_SK_SKB_STREAM_PARSER", Value: 4}, {Name: "BPF_SK_SKB_STREAM_VERDICT", Value: 5}, + {Name: "BPF_ST", Value: 2}, + {Name: "BPF_STX", Value: 3}, + {Name: "BPF_SUB0", Value: 1}, + {Name: "BPF_W0"}, + {Name: "BPF_XADD0", Value: 6}, + {Name: "BPF_XOR0", Value: 10}, {Name: "BRCTL_ADD_BRIDGE", Value: 2}, {Name: "BRCTL_DEL_BRIDGE", Value: 3}, {Name: "BRCTL_GET_BRIDGES", Value: 1}, @@ -17262,6 +17386,7 @@ var consts_amd64 = []ConstValue{ {Name: "_DRM_VBLANK_SECONDARY", Value: 536870912}, {Name: "_DRM_VBLANK_SIGNAL", Value: 1073741824}, {Name: "_DRM_WRITE_COMBINING", Value: 16}, + {Name: "__BPF_FUNC_MAX_ID", Value: 58}, {Name: "__NR_accept", Value: 43}, {Name: "__NR_accept4", Value: 288}, {Name: "__NR_acct", Value: 163}, @@ -17560,6 +17685,9 @@ var consts_amd64 = []ConstValue{ {Name: "__WALL", Value: 1073741824}, {Name: "__WCLONE", Value: 2147483648}, {Name: "__WNOTHREAD", Value: 536870912}, + {Name: "bpf_call_code", Value: 133}, + {Name: "bpf_exit_code", Value: 149}, + {Name: "bpf_insn_load_imm_dw", Value: 24}, } -const revision_amd64 = "ebc3a29c7a5176330e23c3fd866a55abb9402f21" +const revision_amd64 = "4466758fabaf0b60e33956aa3f05f1cb8385d132" -- cgit mrf-deployment