diff options
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/linux/bpf.txt | 48 | ||||
| -rw-r--r-- | sys/linux/gen/386.go | 47 | ||||
| -rw-r--r-- | sys/linux/gen/amd64.go | 47 | ||||
| -rw-r--r-- | sys/linux/gen/arm.go | 47 | ||||
| -rw-r--r-- | sys/linux/gen/arm64.go | 47 | ||||
| -rw-r--r-- | sys/linux/gen/ppc64le.go | 47 |
6 files changed, 195 insertions, 88 deletions
diff --git a/sys/linux/bpf.txt b/sys/linux/bpf.txt index 26f011dbb..72dc2bb5d 100644 --- a/sys/linux/bpf.txt +++ b/sys/linux/bpf.txt @@ -38,9 +38,9 @@ bpf$OBJ_GET_PROG(cmd const[BPF_OBJ_GET], arg ptr[in, bpf_obj_get], size len[arg] bpf$BPF_PROG_ATTACH(cmd const[BPF_PROG_ATTACH], arg ptr[in, bpf_attach_arg], size len[arg]) bpf$BPF_PROG_DETACH(cmd const[BPF_PROG_DETACH], arg ptr[in, bpf_detach_arg], size len[arg]) bpf$BPF_PROG_TEST_RUN(cmd const[BPF_PROG_TEST_RUN], arg ptr[in, bpf_test_prog_arg], size len[arg]) -bpf$BPF_PROG_GET_NEXT_ID(cmd const[BPF_PROG_GET_NEXT_ID], arg ptr[in, int32], size len[arg]) -bpf$BPF_MAP_GET_NEXT_ID(cmd const[BPF_MAP_GET_NEXT_ID], arg ptr[in, int32], size len[arg]) -bpf$BPF_PROG_GET_FD_BY_ID(cmd const[BPF_PROG_GET_FD_BY_ID], arg ptr[in, bpf_prog_id], size len[arg]) fd_bpf_prog +bpf$BPF_PROG_GET_NEXT_ID(cmd const[BPF_PROG_GET_NEXT_ID], arg ptr[in, bpf_obj_get_next_id_arg], size len[arg]) +bpf$BPF_MAP_GET_NEXT_ID(cmd const[BPF_MAP_GET_NEXT_ID], arg ptr[in, bpf_obj_get_next_id_arg], size len[arg]) +bpf$BPF_PROG_GET_FD_BY_ID(cmd const[BPF_PROG_GET_FD_BY_ID], arg ptr[in, bpf_prog_get_fd_by_id_arg], size len[arg]) fd_bpf_prog bpf$BPF_MAP_GET_FD_BY_ID(cmd const[BPF_MAP_GET_FD_BY_ID], arg ptr[in, bpf_map_get_fd_by_id_arg], size len[arg]) fd_bpf_map bpf$BPF_GET_PROG_INFO(cmd const[BPF_OBJ_GET_INFO_BY_FD], arg ptr[in, bpf_get_prog_info_arg], size len[arg]) bpf$BPF_GET_MAP_INFO(cmd const[BPF_OBJ_GET_INFO_BY_FD], arg ptr[in, bpf_get_map_info_arg], size len[arg]) @@ -78,6 +78,7 @@ bpf_map_lookup_arg { map fd_bpf_map key ptr64[in, array[int8]] val ptr64[out, array[int8]] + flags flags[bpf_lookup_flags, int64] } bpf_map_update_arg { @@ -90,12 +91,15 @@ bpf_map_update_arg { bpf_map_delete_arg { map fd_bpf_map key ptr64[in, array[int8]] + value const[0, int64] + flags const[0, int64] } bpf_map_get_next_arg { map fd_bpf_map key ptr64[in, array[int8]] next ptr64[out, array[int8]] + flags const[0, int64] } define BPF_LINE_INFO_SIZE sizeof(struct bpf_line_info) @@ -328,11 +332,13 @@ define MAX_BPF_REG __MAX_BPF_REG bpf_obj_pin_map { path ptr64[in, filename] fd fd_bpf_map + flags const[0, int32] } bpf_obj_pin_prog { path ptr64[in, filename] fd fd_bpf_prog + flags const[0, int32] } bpf_obj_get { @@ -352,19 +358,34 @@ bpf_detach_arg { target const[0, int32] prog fd_bpf_prog type flags[bpf_attach_type, int32] - flags flags[bpf_attach_flags, int32] - prog2 const[0, int32] + flags const[0, int32] } bpf_test_prog_arg { - prog fd_bpf_prog - retval const[0, int32] - insize len[indata, int32] - outsize len[outdata, int32] - indata ptr64[in, array[int8]] - outdata ptr64[out, array[int8]] - repeat int32 - dur const[0, int32] + prog fd_bpf_prog + retval const[0, int32] + insizedata len[indata, int32] + outsizedata len[outdata, int32] + indata ptr64[in, array[int8]] + outdata ptr64[out, array[int8]] + repeat int32 + dur const[0, int32] + insizectx len[inctx, int32] + outsizectx len[outctx, int32] + inctx ptr64[in, array[int8]] + outctx ptr64[in, array[int8]] +} + +bpf_obj_get_next_id_arg { + start int32 + next int32 + flags const[0, int32] +} + +bpf_prog_get_fd_by_id_arg { + prog bpf_prog_id + next const[0, int32] + flags const[0, int32] } bpf_get_prog_info_arg { @@ -641,6 +662,7 @@ bpf_task_fd_query { bpf_map_type = BPF_MAP_TYPE_HASH, BPF_MAP_TYPE_ARRAY, BPF_MAP_TYPE_PROG_ARRAY, BPF_MAP_TYPE_PERF_EVENT_ARRAY, BPF_MAP_TYPE_STACK_TRACE, BPF_MAP_TYPE_CGROUP_ARRAY, BPF_MAP_TYPE_PERCPU_HASH, BPF_MAP_TYPE_PERCPU_ARRAY, BPF_MAP_TYPE_LRU_HASH, BPF_MAP_TYPE_LRU_PERCPU_HASH, BPF_MAP_TYPE_LPM_TRIE, BPF_MAP_TYPE_ARRAY_OF_MAPS, BPF_MAP_TYPE_HASH_OF_MAPS, BPF_MAP_TYPE_DEVMAP, BPF_MAP_TYPE_SOCKMAP, BPF_MAP_TYPE_CPUMAP, BPF_MAP_TYPE_XSKMAP, BPF_MAP_TYPE_SOCKHASH, BPF_MAP_TYPE_CGROUP_STORAGE, BPF_MAP_TYPE_REUSEPORT_SOCKARRAY, BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE, BPF_MAP_TYPE_QUEUE, BPF_MAP_TYPE_STACK, BPF_MAP_TYPE_SK_STORAGE bpf_map_flags = BPF_ANY, BPF_NOEXIST, BPF_EXIST, BPF_F_LOCK +bpf_lookup_flags = BPF_F_LOCK bpf_prog_type = BPF_PROG_TYPE_SOCKET_FILTER, BPF_PROG_TYPE_KPROBE, BPF_PROG_TYPE_SCHED_CLS, BPF_PROG_TYPE_SCHED_ACT, BPF_PROG_TYPE_TRACEPOINT, BPF_PROG_TYPE_XDP, BPF_PROG_TYPE_PERF_EVENT, BPF_PROG_TYPE_CGROUP_SKB, BPF_PROG_TYPE_CGROUP_SOCK, BPF_PROG_TYPE_LWT_IN, BPF_PROG_TYPE_LWT_OUT, BPF_PROG_TYPE_LWT_XMIT, BPF_PROG_TYPE_SOCK_OPS, BPF_PROG_TYPE_SK_SKB, BPF_PROG_TYPE_CGROUP_DEVICE, BPF_PROG_TYPE_SK_MSG, BPF_PROG_TYPE_RAW_TRACEPOINT, BPF_PROG_TYPE_CGROUP_SOCK_ADDR, BPF_PROG_TYPE_LWT_SEG6LOCAL, BPF_PROG_TYPE_LIRC_MODE2, BPF_PROG_TYPE_SK_REUSEPORT, BPF_PROG_TYPE_FLOW_DISSECTOR, BPF_PROG_TYPE_CGROUP_SYSCTL, BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE, BPF_PROG_TYPE_CGROUP_SOCKOPT map_flags = BPF_F_NO_PREALLOC, BPF_F_NO_COMMON_LRU, BPF_F_NUMA_NODE, BPF_F_RDONLY, BPF_F_WRONLY, BPF_F_STACK_BUILD_ID, BPF_F_ZERO_SEED, BPF_F_RDONLY_PROG, BPF_F_WRONLY_PROG bpf_attach_type = BPF_CGROUP_INET_INGRESS, BPF_CGROUP_INET_EGRESS, BPF_CGROUP_INET_SOCK_CREATE, BPF_CGROUP_SOCK_OPS, BPF_SK_SKB_STREAM_PARSER, BPF_SK_SKB_STREAM_VERDICT, BPF_CGROUP_DEVICE, BPF_SK_MSG_VERDICT, BPF_CGROUP_INET4_BIND, BPF_CGROUP_INET6_BIND, BPF_CGROUP_INET4_CONNECT, BPF_CGROUP_INET6_CONNECT, BPF_CGROUP_INET4_POST_BIND, BPF_CGROUP_INET6_POST_BIND, BPF_CGROUP_UDP4_SENDMSG, BPF_CGROUP_UDP6_SENDMSG, BPF_LIRC_MODE2, BPF_FLOW_DISSECTOR, BPF_CGROUP_SYSCTL, BPF_CGROUP_UDP4_RECVMSG, BPF_CGROUP_UDP6_RECVMSG, BPF_CGROUP_GETSOCKOPT, BPF_CGROUP_SETSOCKOPT diff --git a/sys/linux/gen/386.go b/sys/linux/gen/386.go index e7ae7ab82..5b12ed5bb 100644 --- a/sys/linux/gen/386.go +++ b/sys/linux/gen/386.go @@ -1062,12 +1062,11 @@ var structDescs_386 = []*KeyedStruct{ &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "data", IsVarlen: true}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bpf_btf_strings_elem", TypeSize: 1}}, Vals: []uint64{97, 48, 95, 46, 0}}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "z1", TypeSize: 1}}}, }}}, - {Key: StructKey{Name: "bpf_detach_arg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_detach_arg", TypeSize: 20}, Fields: []Type{ + {Key: StructKey{Name: "bpf_detach_arg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_detach_arg", TypeSize: 16}, Fields: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "target", TypeSize: 4}}}, &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_bpf_prog", FldName: "prog", TypeSize: 4}}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bpf_attach_type", FldName: "type", TypeSize: 4}}, Vals: []uint64{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22}}, - &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bpf_attach_flags", FldName: "flags", TypeSize: 4}}, Vals: []uint64{1, 2}, BitMask: true}, - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "prog2", TypeSize: 4}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "flags", TypeSize: 4}}}, }}}, {Key: StructKey{Name: "bpf_framed_program"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_framed_program", IsVarlen: true}, Fields: []Type{ &StructType{Key: StructKey{Name: "bpf_insn_init_r0"}, FldName: "initr0"}, @@ -1215,21 +1214,24 @@ var structDescs_386 = []*KeyedStruct{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "btf_key_type_id", TypeSize: 4}}, Kind: 2, RangeEnd: 5}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "btf_value_type_id", TypeSize: 4}}, Kind: 2, RangeEnd: 5}, }}}, - {Key: StructKey{Name: "bpf_map_delete_arg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_map_delete_arg", TypeSize: 16}, Fields: []Type{ + {Key: StructKey{Name: "bpf_map_delete_arg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_map_delete_arg", TypeSize: 32}, Fields: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_bpf_map", FldName: "map", TypeSize: 4}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 4}}, IsPad: true}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "key", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "value", TypeSize: 8}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "flags", TypeSize: 8}}}, }}}, {Key: StructKey{Name: "bpf_map_get_fd_by_id_arg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_map_get_fd_by_id_arg", TypeSize: 12}, Fields: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "bpf_map_id", FldName: "map_id", TypeSize: 4}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "next_id", TypeSize: 4}}}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bpf_open_flags", FldName: "open_flags", TypeSize: 4}}, Vals: []uint64{8, 16}, BitMask: true}, }}}, - {Key: StructKey{Name: "bpf_map_get_next_arg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_map_get_next_arg", TypeSize: 24}, Fields: []Type{ + {Key: StructKey{Name: "bpf_map_get_next_arg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_map_get_next_arg", TypeSize: 32}, Fields: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_bpf_map", FldName: "map", TypeSize: 4}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 4}}, IsPad: true}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "key", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "next", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", ArgDir: 1, IsVarlen: true}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "flags", TypeSize: 8}}}, }}}, {Key: StructKey{Name: "bpf_map_info", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_map_info", TypeSize: 40, ArgDir: 1}, Fields: []Type{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "type", TypeSize: 4, ArgDir: 1}}}, @@ -1240,11 +1242,12 @@ var structDescs_386 = []*KeyedStruct{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "map_flags", TypeSize: 4, ArgDir: 1}}}, &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "name", TypeSize: 16, ArgDir: 1}, Kind: 1, RangeBegin: 16, RangeEnd: 16}, }, AlignAttr: 8}}, - {Key: StructKey{Name: "bpf_map_lookup_arg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_map_lookup_arg", TypeSize: 24}, Fields: []Type{ + {Key: StructKey{Name: "bpf_map_lookup_arg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_map_lookup_arg", TypeSize: 32}, Fields: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_bpf_map", FldName: "map", TypeSize: 4}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 4}}, IsPad: true}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "key", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "val", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", ArgDir: 1, IsVarlen: true}}}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bpf_lookup_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{4}, BitMask: true}, }}}, {Key: StructKey{Name: "bpf_map_update_arg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_map_update_arg", TypeSize: 32}, Fields: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_bpf_map", FldName: "map", TypeSize: 4}}, @@ -1258,15 +1261,20 @@ var structDescs_386 = []*KeyedStruct{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "fd", TypeSize: 4}}}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bpf_open_flags", FldName: "file_flags", TypeSize: 4}}, Vals: []uint64{8, 16}, BitMask: true}, }}}, + {Key: StructKey{Name: "bpf_obj_get_next_id_arg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_obj_get_next_id_arg", TypeSize: 12}, Fields: []Type{ + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "start", TypeSize: 4}}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "next", TypeSize: 4}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "flags", TypeSize: 4}}}, + }}}, {Key: StructKey{Name: "bpf_obj_pin_map"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_obj_pin_map", TypeSize: 16}, Fields: []Type{ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "path", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename", IsVarlen: true}, Kind: 3}}, &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_bpf_map", FldName: "fd", TypeSize: 4}}, - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 4}}, IsPad: true}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "flags", TypeSize: 4}}}, }}}, {Key: StructKey{Name: "bpf_obj_pin_prog"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_obj_pin_prog", TypeSize: 16}, Fields: []Type{ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "path", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename", IsVarlen: true}, Kind: 3}}, &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_bpf_prog", FldName: "fd", TypeSize: 4}}, - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 4}}, IsPad: true}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "flags", TypeSize: 4}}}, }}}, {Key: StructKey{Name: "bpf_options"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_options", IsVarlen: true}, Fields: []Type{ &StructType{Key: StructKey{Name: "fs_opt[\"mode\", fmt[oct, int32]]"}, FldName: "mode"}, @@ -1293,6 +1301,11 @@ var structDescs_386 = []*KeyedStruct{ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "line_info_cnt", TypeSize: 4}}, Path: []string{"line_info"}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 4}}, IsPad: true}, }}}, + {Key: StructKey{Name: "bpf_prog_get_fd_by_id_arg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_prog_get_fd_by_id_arg", TypeSize: 12}, Fields: []Type{ + &ResourceType{TypeCommon: TypeCommon{TypeName: "bpf_prog_id", FldName: "prog", TypeSize: 4}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "next", TypeSize: 4}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "flags", TypeSize: 4}}}, + }}}, {Key: StructKey{Name: "bpf_prog_info", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_prog_info", TypeSize: 192, ArgDir: 1}, Fields: []Type{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "type", TypeSize: 4, ArgDir: 1}}}, &ResourceType{TypeCommon: TypeCommon{TypeName: "bpf_prog_id", FldName: "id", TypeSize: 4, ArgDir: 1}}, @@ -1352,15 +1365,19 @@ var structDescs_386 = []*KeyedStruct{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "probe_offset", TypeSize: 8, ArgDir: 2}}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "probe_addr", TypeSize: 8, ArgDir: 2}}}, }}}, - {Key: StructKey{Name: "bpf_test_prog_arg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_test_prog_arg", TypeSize: 40}, Fields: []Type{ + {Key: StructKey{Name: "bpf_test_prog_arg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_test_prog_arg", TypeSize: 64}, Fields: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_bpf_prog", FldName: "prog", TypeSize: 4}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "retval", TypeSize: 4}}}, - &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "insize", TypeSize: 4}}, Path: []string{"indata"}}, - &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "outsize", TypeSize: 4}}, Path: []string{"outdata"}}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "insizedata", TypeSize: 4}}, Path: []string{"indata"}}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "outsizedata", TypeSize: 4}}, Path: []string{"outdata"}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "indata", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "outdata", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", ArgDir: 1, IsVarlen: true}}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "repeat", TypeSize: 4}}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "dur", TypeSize: 4}}}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "insizectx", TypeSize: 4}}, Path: []string{"inctx"}}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "outsizectx", TypeSize: 4}}, Path: []string{"outctx"}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "inctx", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "outctx", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}}}, }}}, {Key: StructKey{Name: "br_policy"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "br_policy", IsVarlen: true}, Fields: []Type{ &StructType{Key: StructKey{Name: "nlattr_t[const[IFLA_BR_FORWARD_DELAY, int16], int32[2:30]]"}, FldName: "IFLA_BR_FORWARD_DELAY"}, @@ -30145,7 +30162,7 @@ var syscalls_386 = []*Syscall{ }, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_bpf_map", FldName: "ret", TypeSize: 4, ArgDir: 1}}}, {NR: 357, Name: "bpf$BPF_MAP_GET_NEXT_ID", CallName: "bpf", Args: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 4}}, Val: 12}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 4}, Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "bpf_obj_get_next_id_arg"}}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "size", TypeSize: 4}}, Path: []string{"arg"}}, }}, {NR: 357, Name: "bpf$BPF_MAP_LOOKUP_AND_DELETE_ELEM", CallName: "bpf", Args: []Type{ @@ -30165,12 +30182,12 @@ var syscalls_386 = []*Syscall{ }}, {NR: 357, Name: "bpf$BPF_PROG_GET_FD_BY_ID", CallName: "bpf", Args: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 4}}, Val: 13}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 4}, Type: &ResourceType{TypeCommon: TypeCommon{TypeName: "bpf_prog_id", TypeSize: 4}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "bpf_prog_get_fd_by_id_arg"}}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "size", TypeSize: 4}}, Path: []string{"arg"}}, }, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_bpf_prog", FldName: "ret", TypeSize: 4, ArgDir: 1}}}, {NR: 357, Name: "bpf$BPF_PROG_GET_NEXT_ID", CallName: "bpf", Args: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 4}}, Val: 11}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 4}, Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "bpf_obj_get_next_id_arg"}}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "size", TypeSize: 4}}, Path: []string{"arg"}}, }}, {NR: 357, Name: "bpf$BPF_PROG_QUERY", CallName: "bpf", Args: []Type{ @@ -52577,4 +52594,4 @@ var consts_386 = []ConstValue{ {Name: "bpf_insn_load_imm_dw", Value: 24}, } -const revision_386 = "06a46a2a7ae10127406f08f1ad94d9ec2a481cf0" +const revision_386 = "b5a4cc4c6b1fdd399fb7a05dd2fbc5d2abd7a770" diff --git a/sys/linux/gen/amd64.go b/sys/linux/gen/amd64.go index 7f2883f14..0e0f62778 100644 --- a/sys/linux/gen/amd64.go +++ b/sys/linux/gen/amd64.go @@ -1065,12 +1065,11 @@ var structDescs_amd64 = []*KeyedStruct{ &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "data", IsVarlen: true}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bpf_btf_strings_elem", TypeSize: 1}}, Vals: []uint64{97, 48, 95, 46, 0}}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "z1", TypeSize: 1}}}, }}}, - {Key: StructKey{Name: "bpf_detach_arg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_detach_arg", TypeSize: 20}, Fields: []Type{ + {Key: StructKey{Name: "bpf_detach_arg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_detach_arg", TypeSize: 16}, Fields: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "target", TypeSize: 4}}}, &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_bpf_prog", FldName: "prog", TypeSize: 4}}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bpf_attach_type", FldName: "type", TypeSize: 4}}, Vals: []uint64{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22}}, - &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bpf_attach_flags", FldName: "flags", TypeSize: 4}}, Vals: []uint64{1, 2}, BitMask: true}, - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "prog2", TypeSize: 4}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "flags", TypeSize: 4}}}, }}}, {Key: StructKey{Name: "bpf_framed_program"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_framed_program", IsVarlen: true}, Fields: []Type{ &StructType{Key: StructKey{Name: "bpf_insn_init_r0"}, FldName: "initr0"}, @@ -1218,21 +1217,24 @@ var structDescs_amd64 = []*KeyedStruct{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "btf_key_type_id", TypeSize: 4}}, Kind: 2, RangeEnd: 5}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "btf_value_type_id", TypeSize: 4}}, Kind: 2, RangeEnd: 5}, }}}, - {Key: StructKey{Name: "bpf_map_delete_arg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_map_delete_arg", TypeSize: 16}, Fields: []Type{ + {Key: StructKey{Name: "bpf_map_delete_arg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_map_delete_arg", TypeSize: 32}, Fields: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_bpf_map", FldName: "map", TypeSize: 4}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 4}}, IsPad: true}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "key", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "value", TypeSize: 8}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "flags", TypeSize: 8}}}, }}}, {Key: StructKey{Name: "bpf_map_get_fd_by_id_arg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_map_get_fd_by_id_arg", TypeSize: 12}, Fields: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "bpf_map_id", FldName: "map_id", TypeSize: 4}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "next_id", TypeSize: 4}}}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bpf_open_flags", FldName: "open_flags", TypeSize: 4}}, Vals: []uint64{8, 16}, BitMask: true}, }}}, - {Key: StructKey{Name: "bpf_map_get_next_arg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_map_get_next_arg", TypeSize: 24}, Fields: []Type{ + {Key: StructKey{Name: "bpf_map_get_next_arg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_map_get_next_arg", TypeSize: 32}, Fields: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_bpf_map", FldName: "map", TypeSize: 4}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 4}}, IsPad: true}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "key", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "next", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", ArgDir: 1, IsVarlen: true}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "flags", TypeSize: 8}}}, }}}, {Key: StructKey{Name: "bpf_map_info", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_map_info", TypeSize: 40, ArgDir: 1}, Fields: []Type{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "type", TypeSize: 4, ArgDir: 1}}}, @@ -1243,11 +1245,12 @@ var structDescs_amd64 = []*KeyedStruct{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "map_flags", TypeSize: 4, ArgDir: 1}}}, &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "name", TypeSize: 16, ArgDir: 1}, Kind: 1, RangeBegin: 16, RangeEnd: 16}, }, AlignAttr: 8}}, - {Key: StructKey{Name: "bpf_map_lookup_arg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_map_lookup_arg", TypeSize: 24}, Fields: []Type{ + {Key: StructKey{Name: "bpf_map_lookup_arg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_map_lookup_arg", TypeSize: 32}, Fields: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_bpf_map", FldName: "map", TypeSize: 4}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 4}}, IsPad: true}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "key", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "val", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", ArgDir: 1, IsVarlen: true}}}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bpf_lookup_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{4}, BitMask: true}, }}}, {Key: StructKey{Name: "bpf_map_update_arg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_map_update_arg", TypeSize: 32}, Fields: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_bpf_map", FldName: "map", TypeSize: 4}}, @@ -1261,15 +1264,20 @@ var structDescs_amd64 = []*KeyedStruct{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "fd", TypeSize: 4}}}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bpf_open_flags", FldName: "file_flags", TypeSize: 4}}, Vals: []uint64{8, 16}, BitMask: true}, }}}, + {Key: StructKey{Name: "bpf_obj_get_next_id_arg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_obj_get_next_id_arg", TypeSize: 12}, Fields: []Type{ + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "start", TypeSize: 4}}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "next", TypeSize: 4}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "flags", TypeSize: 4}}}, + }}}, {Key: StructKey{Name: "bpf_obj_pin_map"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_obj_pin_map", TypeSize: 16}, Fields: []Type{ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "path", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename", IsVarlen: true}, Kind: 3}}, &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_bpf_map", FldName: "fd", TypeSize: 4}}, - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 4}}, IsPad: true}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "flags", TypeSize: 4}}}, }}}, {Key: StructKey{Name: "bpf_obj_pin_prog"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_obj_pin_prog", TypeSize: 16}, Fields: []Type{ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "path", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename", IsVarlen: true}, Kind: 3}}, &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_bpf_prog", FldName: "fd", TypeSize: 4}}, - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 4}}, IsPad: true}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "flags", TypeSize: 4}}}, }}}, {Key: StructKey{Name: "bpf_options"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_options", IsVarlen: true}, Fields: []Type{ &StructType{Key: StructKey{Name: "fs_opt[\"mode\", fmt[oct, int32]]"}, FldName: "mode"}, @@ -1296,6 +1304,11 @@ var structDescs_amd64 = []*KeyedStruct{ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "line_info_cnt", TypeSize: 4}}, Path: []string{"line_info"}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 4}}, IsPad: true}, }}}, + {Key: StructKey{Name: "bpf_prog_get_fd_by_id_arg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_prog_get_fd_by_id_arg", TypeSize: 12}, Fields: []Type{ + &ResourceType{TypeCommon: TypeCommon{TypeName: "bpf_prog_id", FldName: "prog", TypeSize: 4}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "next", TypeSize: 4}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "flags", TypeSize: 4}}}, + }}}, {Key: StructKey{Name: "bpf_prog_info", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_prog_info", TypeSize: 192, ArgDir: 1}, Fields: []Type{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "type", TypeSize: 4, ArgDir: 1}}}, &ResourceType{TypeCommon: TypeCommon{TypeName: "bpf_prog_id", FldName: "id", TypeSize: 4, ArgDir: 1}}, @@ -1355,15 +1368,19 @@ var structDescs_amd64 = []*KeyedStruct{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "probe_offset", TypeSize: 8, ArgDir: 2}}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "probe_addr", TypeSize: 8, ArgDir: 2}}}, }}}, - {Key: StructKey{Name: "bpf_test_prog_arg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_test_prog_arg", TypeSize: 40}, Fields: []Type{ + {Key: StructKey{Name: "bpf_test_prog_arg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_test_prog_arg", TypeSize: 64}, Fields: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_bpf_prog", FldName: "prog", TypeSize: 4}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "retval", TypeSize: 4}}}, - &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "insize", TypeSize: 4}}, Path: []string{"indata"}}, - &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "outsize", TypeSize: 4}}, Path: []string{"outdata"}}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "insizedata", TypeSize: 4}}, Path: []string{"indata"}}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "outsizedata", TypeSize: 4}}, Path: []string{"outdata"}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "indata", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "outdata", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", ArgDir: 1, IsVarlen: true}}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "repeat", TypeSize: 4}}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "dur", TypeSize: 4}}}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "insizectx", TypeSize: 4}}, Path: []string{"inctx"}}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "outsizectx", TypeSize: 4}}, Path: []string{"outctx"}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "inctx", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "outctx", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}}}, }}}, {Key: StructKey{Name: "br_policy"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "br_policy", IsVarlen: true}, Fields: []Type{ &StructType{Key: StructKey{Name: "nlattr_t[const[IFLA_BR_FORWARD_DELAY, int16], int32[2:30]]"}, FldName: "IFLA_BR_FORWARD_DELAY"}, @@ -30642,7 +30659,7 @@ var syscalls_amd64 = []*Syscall{ }, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_bpf_map", FldName: "ret", TypeSize: 4, ArgDir: 1}}}, {NR: 321, Name: "bpf$BPF_MAP_GET_NEXT_ID", CallName: "bpf", Args: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 12}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "bpf_obj_get_next_id_arg"}}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "size", TypeSize: 8}}, Path: []string{"arg"}}, }}, {NR: 321, Name: "bpf$BPF_MAP_LOOKUP_AND_DELETE_ELEM", CallName: "bpf", Args: []Type{ @@ -30662,12 +30679,12 @@ var syscalls_amd64 = []*Syscall{ }}, {NR: 321, Name: "bpf$BPF_PROG_GET_FD_BY_ID", CallName: "bpf", Args: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 13}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &ResourceType{TypeCommon: TypeCommon{TypeName: "bpf_prog_id", TypeSize: 4}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "bpf_prog_get_fd_by_id_arg"}}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "size", TypeSize: 8}}, Path: []string{"arg"}}, }, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_bpf_prog", FldName: "ret", TypeSize: 4, ArgDir: 1}}}, {NR: 321, Name: "bpf$BPF_PROG_GET_NEXT_ID", CallName: "bpf", Args: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 11}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "bpf_obj_get_next_id_arg"}}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "size", TypeSize: 8}}, Path: []string{"arg"}}, }}, {NR: 321, Name: "bpf$BPF_PROG_QUERY", CallName: "bpf", Args: []Type{ @@ -53116,4 +53133,4 @@ var consts_amd64 = []ConstValue{ {Name: "bpf_insn_load_imm_dw", Value: 24}, } -const revision_amd64 = "950641516b14e37a24b87f776843de39faa96b11" +const revision_amd64 = "d72774c248f2476b88ba58e9bb6998573e436735" diff --git a/sys/linux/gen/arm.go b/sys/linux/gen/arm.go index 4c7df5e48..dd5286544 100644 --- a/sys/linux/gen/arm.go +++ b/sys/linux/gen/arm.go @@ -1062,12 +1062,11 @@ var structDescs_arm = []*KeyedStruct{ &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "data", IsVarlen: true}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bpf_btf_strings_elem", TypeSize: 1}}, Vals: []uint64{97, 48, 95, 46, 0}}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "z1", TypeSize: 1}}}, }}}, - {Key: StructKey{Name: "bpf_detach_arg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_detach_arg", TypeSize: 20}, Fields: []Type{ + {Key: StructKey{Name: "bpf_detach_arg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_detach_arg", TypeSize: 16}, Fields: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "target", TypeSize: 4}}}, &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_bpf_prog", FldName: "prog", TypeSize: 4}}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bpf_attach_type", FldName: "type", TypeSize: 4}}, Vals: []uint64{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22}}, - &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bpf_attach_flags", FldName: "flags", TypeSize: 4}}, Vals: []uint64{1, 2}, BitMask: true}, - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "prog2", TypeSize: 4}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "flags", TypeSize: 4}}}, }}}, {Key: StructKey{Name: "bpf_framed_program"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_framed_program", IsVarlen: true}, Fields: []Type{ &StructType{Key: StructKey{Name: "bpf_insn_init_r0"}, FldName: "initr0"}, @@ -1215,21 +1214,24 @@ var structDescs_arm = []*KeyedStruct{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "btf_key_type_id", TypeSize: 4}}, Kind: 2, RangeEnd: 5}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "btf_value_type_id", TypeSize: 4}}, Kind: 2, RangeEnd: 5}, }}}, - {Key: StructKey{Name: "bpf_map_delete_arg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_map_delete_arg", TypeSize: 16}, Fields: []Type{ + {Key: StructKey{Name: "bpf_map_delete_arg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_map_delete_arg", TypeSize: 32}, Fields: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_bpf_map", FldName: "map", TypeSize: 4}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 4}}, IsPad: true}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "key", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "value", TypeSize: 8}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "flags", TypeSize: 8}}}, }}}, {Key: StructKey{Name: "bpf_map_get_fd_by_id_arg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_map_get_fd_by_id_arg", TypeSize: 12}, Fields: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "bpf_map_id", FldName: "map_id", TypeSize: 4}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "next_id", TypeSize: 4}}}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bpf_open_flags", FldName: "open_flags", TypeSize: 4}}, Vals: []uint64{8, 16}, BitMask: true}, }}}, - {Key: StructKey{Name: "bpf_map_get_next_arg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_map_get_next_arg", TypeSize: 24}, Fields: []Type{ + {Key: StructKey{Name: "bpf_map_get_next_arg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_map_get_next_arg", TypeSize: 32}, Fields: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_bpf_map", FldName: "map", TypeSize: 4}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 4}}, IsPad: true}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "key", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "next", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", ArgDir: 1, IsVarlen: true}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "flags", TypeSize: 8}}}, }}}, {Key: StructKey{Name: "bpf_map_info", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_map_info", TypeSize: 40, ArgDir: 1}, Fields: []Type{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "type", TypeSize: 4, ArgDir: 1}}}, @@ -1240,11 +1242,12 @@ var structDescs_arm = []*KeyedStruct{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "map_flags", TypeSize: 4, ArgDir: 1}}}, &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "name", TypeSize: 16, ArgDir: 1}, Kind: 1, RangeBegin: 16, RangeEnd: 16}, }, AlignAttr: 8}}, - {Key: StructKey{Name: "bpf_map_lookup_arg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_map_lookup_arg", TypeSize: 24}, Fields: []Type{ + {Key: StructKey{Name: "bpf_map_lookup_arg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_map_lookup_arg", TypeSize: 32}, Fields: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_bpf_map", FldName: "map", TypeSize: 4}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 4}}, IsPad: true}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "key", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "val", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", ArgDir: 1, IsVarlen: true}}}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bpf_lookup_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{4}, BitMask: true}, }}}, {Key: StructKey{Name: "bpf_map_update_arg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_map_update_arg", TypeSize: 32}, Fields: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_bpf_map", FldName: "map", TypeSize: 4}}, @@ -1258,15 +1261,20 @@ var structDescs_arm = []*KeyedStruct{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "fd", TypeSize: 4}}}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bpf_open_flags", FldName: "file_flags", TypeSize: 4}}, Vals: []uint64{8, 16}, BitMask: true}, }}}, + {Key: StructKey{Name: "bpf_obj_get_next_id_arg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_obj_get_next_id_arg", TypeSize: 12}, Fields: []Type{ + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "start", TypeSize: 4}}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "next", TypeSize: 4}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "flags", TypeSize: 4}}}, + }}}, {Key: StructKey{Name: "bpf_obj_pin_map"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_obj_pin_map", TypeSize: 16}, Fields: []Type{ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "path", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename", IsVarlen: true}, Kind: 3}}, &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_bpf_map", FldName: "fd", TypeSize: 4}}, - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 4}}, IsPad: true}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "flags", TypeSize: 4}}}, }}}, {Key: StructKey{Name: "bpf_obj_pin_prog"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_obj_pin_prog", TypeSize: 16}, Fields: []Type{ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "path", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename", IsVarlen: true}, Kind: 3}}, &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_bpf_prog", FldName: "fd", TypeSize: 4}}, - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 4}}, IsPad: true}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "flags", TypeSize: 4}}}, }}}, {Key: StructKey{Name: "bpf_options"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_options", IsVarlen: true}, Fields: []Type{ &StructType{Key: StructKey{Name: "fs_opt[\"mode\", fmt[oct, int32]]"}, FldName: "mode"}, @@ -1293,6 +1301,11 @@ var structDescs_arm = []*KeyedStruct{ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "line_info_cnt", TypeSize: 4}}, Path: []string{"line_info"}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 4}}, IsPad: true}, }}}, + {Key: StructKey{Name: "bpf_prog_get_fd_by_id_arg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_prog_get_fd_by_id_arg", TypeSize: 12}, Fields: []Type{ + &ResourceType{TypeCommon: TypeCommon{TypeName: "bpf_prog_id", FldName: "prog", TypeSize: 4}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "next", TypeSize: 4}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "flags", TypeSize: 4}}}, + }}}, {Key: StructKey{Name: "bpf_prog_info", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_prog_info", TypeSize: 192, ArgDir: 1}, Fields: []Type{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "type", TypeSize: 4, ArgDir: 1}}}, &ResourceType{TypeCommon: TypeCommon{TypeName: "bpf_prog_id", FldName: "id", TypeSize: 4, ArgDir: 1}}, @@ -1352,15 +1365,19 @@ var structDescs_arm = []*KeyedStruct{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "probe_offset", TypeSize: 8, ArgDir: 2}}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "probe_addr", TypeSize: 8, ArgDir: 2}}}, }}}, - {Key: StructKey{Name: "bpf_test_prog_arg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_test_prog_arg", TypeSize: 40}, Fields: []Type{ + {Key: StructKey{Name: "bpf_test_prog_arg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_test_prog_arg", TypeSize: 64}, Fields: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_bpf_prog", FldName: "prog", TypeSize: 4}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "retval", TypeSize: 4}}}, - &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "insize", TypeSize: 4}}, Path: []string{"indata"}}, - &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "outsize", TypeSize: 4}}, Path: []string{"outdata"}}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "insizedata", TypeSize: 4}}, Path: []string{"indata"}}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "outsizedata", TypeSize: 4}}, Path: []string{"outdata"}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "indata", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "outdata", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", ArgDir: 1, IsVarlen: true}}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "repeat", TypeSize: 4}}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "dur", TypeSize: 4}}}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "insizectx", TypeSize: 4}}, Path: []string{"inctx"}}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "outsizectx", TypeSize: 4}}, Path: []string{"outctx"}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "inctx", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "outctx", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}}}, }}}, {Key: StructKey{Name: "br_policy"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "br_policy", IsVarlen: true}, Fields: []Type{ &StructType{Key: StructKey{Name: "nlattr_t[const[IFLA_BR_FORWARD_DELAY, int16], int32[2:30]]"}, FldName: "IFLA_BR_FORWARD_DELAY"}, @@ -29967,7 +29984,7 @@ var syscalls_arm = []*Syscall{ }, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_bpf_map", FldName: "ret", TypeSize: 4, ArgDir: 1}}}, {NR: 386, Name: "bpf$BPF_MAP_GET_NEXT_ID", CallName: "bpf", Args: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 4}}, Val: 12}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 4}, Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "bpf_obj_get_next_id_arg"}}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "size", TypeSize: 4}}, Path: []string{"arg"}}, }}, {NR: 386, Name: "bpf$BPF_MAP_LOOKUP_AND_DELETE_ELEM", CallName: "bpf", Args: []Type{ @@ -29987,12 +30004,12 @@ var syscalls_arm = []*Syscall{ }}, {NR: 386, Name: "bpf$BPF_PROG_GET_FD_BY_ID", CallName: "bpf", Args: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 4}}, Val: 13}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 4}, Type: &ResourceType{TypeCommon: TypeCommon{TypeName: "bpf_prog_id", TypeSize: 4}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "bpf_prog_get_fd_by_id_arg"}}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "size", TypeSize: 4}}, Path: []string{"arg"}}, }, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_bpf_prog", FldName: "ret", TypeSize: 4, ArgDir: 1}}}, {NR: 386, Name: "bpf$BPF_PROG_GET_NEXT_ID", CallName: "bpf", Args: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 4}}, Val: 11}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 4}, Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "bpf_obj_get_next_id_arg"}}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "size", TypeSize: 4}}, Path: []string{"arg"}}, }}, {NR: 386, Name: "bpf$BPF_PROG_QUERY", CallName: "bpf", Args: []Type{ @@ -52154,4 +52171,4 @@ var consts_arm = []ConstValue{ {Name: "bpf_insn_load_imm_dw", Value: 24}, } -const revision_arm = "0aa3c11bf6e076a37d71698c47ed1b7a357f24c6" +const revision_arm = "dba0909c2694a0a90231c3885b4b8d41c11c2d7e" diff --git a/sys/linux/gen/arm64.go b/sys/linux/gen/arm64.go index 07bac9d4e..b0fc5fed5 100644 --- a/sys/linux/gen/arm64.go +++ b/sys/linux/gen/arm64.go @@ -1065,12 +1065,11 @@ var structDescs_arm64 = []*KeyedStruct{ &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "data", IsVarlen: true}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bpf_btf_strings_elem", TypeSize: 1}}, Vals: []uint64{97, 48, 95, 46, 0}}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "z1", TypeSize: 1}}}, }}}, - {Key: StructKey{Name: "bpf_detach_arg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_detach_arg", TypeSize: 20}, Fields: []Type{ + {Key: StructKey{Name: "bpf_detach_arg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_detach_arg", TypeSize: 16}, Fields: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "target", TypeSize: 4}}}, &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_bpf_prog", FldName: "prog", TypeSize: 4}}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bpf_attach_type", FldName: "type", TypeSize: 4}}, Vals: []uint64{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22}}, - &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bpf_attach_flags", FldName: "flags", TypeSize: 4}}, Vals: []uint64{1, 2}, BitMask: true}, - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "prog2", TypeSize: 4}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "flags", TypeSize: 4}}}, }}}, {Key: StructKey{Name: "bpf_framed_program"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_framed_program", IsVarlen: true}, Fields: []Type{ &StructType{Key: StructKey{Name: "bpf_insn_init_r0"}, FldName: "initr0"}, @@ -1218,21 +1217,24 @@ var structDescs_arm64 = []*KeyedStruct{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "btf_key_type_id", TypeSize: 4}}, Kind: 2, RangeEnd: 5}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "btf_value_type_id", TypeSize: 4}}, Kind: 2, RangeEnd: 5}, }}}, - {Key: StructKey{Name: "bpf_map_delete_arg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_map_delete_arg", TypeSize: 16}, Fields: []Type{ + {Key: StructKey{Name: "bpf_map_delete_arg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_map_delete_arg", TypeSize: 32}, Fields: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_bpf_map", FldName: "map", TypeSize: 4}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 4}}, IsPad: true}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "key", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "value", TypeSize: 8}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "flags", TypeSize: 8}}}, }}}, {Key: StructKey{Name: "bpf_map_get_fd_by_id_arg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_map_get_fd_by_id_arg", TypeSize: 12}, Fields: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "bpf_map_id", FldName: "map_id", TypeSize: 4}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "next_id", TypeSize: 4}}}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bpf_open_flags", FldName: "open_flags", TypeSize: 4}}, Vals: []uint64{8, 16}, BitMask: true}, }}}, - {Key: StructKey{Name: "bpf_map_get_next_arg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_map_get_next_arg", TypeSize: 24}, Fields: []Type{ + {Key: StructKey{Name: "bpf_map_get_next_arg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_map_get_next_arg", TypeSize: 32}, Fields: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_bpf_map", FldName: "map", TypeSize: 4}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 4}}, IsPad: true}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "key", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "next", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", ArgDir: 1, IsVarlen: true}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "flags", TypeSize: 8}}}, }}}, {Key: StructKey{Name: "bpf_map_info", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_map_info", TypeSize: 40, ArgDir: 1}, Fields: []Type{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "type", TypeSize: 4, ArgDir: 1}}}, @@ -1243,11 +1245,12 @@ var structDescs_arm64 = []*KeyedStruct{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "map_flags", TypeSize: 4, ArgDir: 1}}}, &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "name", TypeSize: 16, ArgDir: 1}, Kind: 1, RangeBegin: 16, RangeEnd: 16}, }, AlignAttr: 8}}, - {Key: StructKey{Name: "bpf_map_lookup_arg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_map_lookup_arg", TypeSize: 24}, Fields: []Type{ + {Key: StructKey{Name: "bpf_map_lookup_arg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_map_lookup_arg", TypeSize: 32}, Fields: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_bpf_map", FldName: "map", TypeSize: 4}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 4}}, IsPad: true}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "key", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "val", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", ArgDir: 1, IsVarlen: true}}}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bpf_lookup_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{4}, BitMask: true}, }}}, {Key: StructKey{Name: "bpf_map_update_arg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_map_update_arg", TypeSize: 32}, Fields: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_bpf_map", FldName: "map", TypeSize: 4}}, @@ -1261,15 +1264,20 @@ var structDescs_arm64 = []*KeyedStruct{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "fd", TypeSize: 4}}}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bpf_open_flags", FldName: "file_flags", TypeSize: 4}}, Vals: []uint64{8, 16}, BitMask: true}, }}}, + {Key: StructKey{Name: "bpf_obj_get_next_id_arg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_obj_get_next_id_arg", TypeSize: 12}, Fields: []Type{ + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "start", TypeSize: 4}}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "next", TypeSize: 4}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "flags", TypeSize: 4}}}, + }}}, {Key: StructKey{Name: "bpf_obj_pin_map"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_obj_pin_map", TypeSize: 16}, Fields: []Type{ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "path", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename", IsVarlen: true}, Kind: 3}}, &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_bpf_map", FldName: "fd", TypeSize: 4}}, - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 4}}, IsPad: true}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "flags", TypeSize: 4}}}, }}}, {Key: StructKey{Name: "bpf_obj_pin_prog"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_obj_pin_prog", TypeSize: 16}, Fields: []Type{ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "path", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename", IsVarlen: true}, Kind: 3}}, &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_bpf_prog", FldName: "fd", TypeSize: 4}}, - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 4}}, IsPad: true}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "flags", TypeSize: 4}}}, }}}, {Key: StructKey{Name: "bpf_options"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_options", IsVarlen: true}, Fields: []Type{ &StructType{Key: StructKey{Name: "fs_opt[\"mode\", fmt[oct, int32]]"}, FldName: "mode"}, @@ -1296,6 +1304,11 @@ var structDescs_arm64 = []*KeyedStruct{ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "line_info_cnt", TypeSize: 4}}, Path: []string{"line_info"}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 4}}, IsPad: true}, }}}, + {Key: StructKey{Name: "bpf_prog_get_fd_by_id_arg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_prog_get_fd_by_id_arg", TypeSize: 12}, Fields: []Type{ + &ResourceType{TypeCommon: TypeCommon{TypeName: "bpf_prog_id", FldName: "prog", TypeSize: 4}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "next", TypeSize: 4}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "flags", TypeSize: 4}}}, + }}}, {Key: StructKey{Name: "bpf_prog_info", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_prog_info", TypeSize: 192, ArgDir: 1}, Fields: []Type{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "type", TypeSize: 4, ArgDir: 1}}}, &ResourceType{TypeCommon: TypeCommon{TypeName: "bpf_prog_id", FldName: "id", TypeSize: 4, ArgDir: 1}}, @@ -1355,15 +1368,19 @@ var structDescs_arm64 = []*KeyedStruct{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "probe_offset", TypeSize: 8, ArgDir: 2}}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "probe_addr", TypeSize: 8, ArgDir: 2}}}, }}}, - {Key: StructKey{Name: "bpf_test_prog_arg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_test_prog_arg", TypeSize: 40}, Fields: []Type{ + {Key: StructKey{Name: "bpf_test_prog_arg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_test_prog_arg", TypeSize: 64}, Fields: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_bpf_prog", FldName: "prog", TypeSize: 4}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "retval", TypeSize: 4}}}, - &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "insize", TypeSize: 4}}, Path: []string{"indata"}}, - &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "outsize", TypeSize: 4}}, Path: []string{"outdata"}}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "insizedata", TypeSize: 4}}, Path: []string{"indata"}}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "outsizedata", TypeSize: 4}}, Path: []string{"outdata"}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "indata", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "outdata", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", ArgDir: 1, IsVarlen: true}}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "repeat", TypeSize: 4}}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "dur", TypeSize: 4}}}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "insizectx", TypeSize: 4}}, Path: []string{"inctx"}}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "outsizectx", TypeSize: 4}}, Path: []string{"outctx"}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "inctx", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "outctx", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}}}, }}}, {Key: StructKey{Name: "br_policy"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "br_policy", IsVarlen: true}, Fields: []Type{ &StructType{Key: StructKey{Name: "nlattr_t[const[IFLA_BR_FORWARD_DELAY, int16], int32[2:30]]"}, FldName: "IFLA_BR_FORWARD_DELAY"}, @@ -30400,7 +30417,7 @@ var syscalls_arm64 = []*Syscall{ }, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_bpf_map", FldName: "ret", TypeSize: 4, ArgDir: 1}}}, {NR: 280, Name: "bpf$BPF_MAP_GET_NEXT_ID", CallName: "bpf", Args: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 12}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "bpf_obj_get_next_id_arg"}}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "size", TypeSize: 8}}, Path: []string{"arg"}}, }}, {NR: 280, Name: "bpf$BPF_MAP_LOOKUP_AND_DELETE_ELEM", CallName: "bpf", Args: []Type{ @@ -30420,12 +30437,12 @@ var syscalls_arm64 = []*Syscall{ }}, {NR: 280, Name: "bpf$BPF_PROG_GET_FD_BY_ID", CallName: "bpf", Args: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 13}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &ResourceType{TypeCommon: TypeCommon{TypeName: "bpf_prog_id", TypeSize: 4}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "bpf_prog_get_fd_by_id_arg"}}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "size", TypeSize: 8}}, Path: []string{"arg"}}, }, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_bpf_prog", FldName: "ret", TypeSize: 4, ArgDir: 1}}}, {NR: 280, Name: "bpf$BPF_PROG_GET_NEXT_ID", CallName: "bpf", Args: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 11}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "bpf_obj_get_next_id_arg"}}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "size", TypeSize: 8}}, Path: []string{"arg"}}, }}, {NR: 280, Name: "bpf$BPF_PROG_QUERY", CallName: "bpf", Args: []Type{ @@ -52468,4 +52485,4 @@ var consts_arm64 = []ConstValue{ {Name: "bpf_insn_load_imm_dw", Value: 24}, } -const revision_arm64 = "943716b9c4e173be4c989e89d2bcbf561ce53fae" +const revision_arm64 = "2520bc22c676f8f4d85dfa6dffdc896f97ad4b19" diff --git a/sys/linux/gen/ppc64le.go b/sys/linux/gen/ppc64le.go index c97f16a2e..e0c0949d8 100644 --- a/sys/linux/gen/ppc64le.go +++ b/sys/linux/gen/ppc64le.go @@ -1064,12 +1064,11 @@ var structDescs_ppc64le = []*KeyedStruct{ &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "data", IsVarlen: true}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bpf_btf_strings_elem", TypeSize: 1}}, Vals: []uint64{97, 48, 95, 46, 0}}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "z1", TypeSize: 1}}}, }}}, - {Key: StructKey{Name: "bpf_detach_arg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_detach_arg", TypeSize: 20}, Fields: []Type{ + {Key: StructKey{Name: "bpf_detach_arg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_detach_arg", TypeSize: 16}, Fields: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "target", TypeSize: 4}}}, &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_bpf_prog", FldName: "prog", TypeSize: 4}}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bpf_attach_type", FldName: "type", TypeSize: 4}}, Vals: []uint64{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22}}, - &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bpf_attach_flags", FldName: "flags", TypeSize: 4}}, Vals: []uint64{1, 2}, BitMask: true}, - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "prog2", TypeSize: 4}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "flags", TypeSize: 4}}}, }}}, {Key: StructKey{Name: "bpf_framed_program"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_framed_program", IsVarlen: true}, Fields: []Type{ &StructType{Key: StructKey{Name: "bpf_insn_init_r0"}, FldName: "initr0"}, @@ -1217,21 +1216,24 @@ var structDescs_ppc64le = []*KeyedStruct{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "btf_key_type_id", TypeSize: 4}}, Kind: 2, RangeEnd: 5}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "btf_value_type_id", TypeSize: 4}}, Kind: 2, RangeEnd: 5}, }}}, - {Key: StructKey{Name: "bpf_map_delete_arg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_map_delete_arg", TypeSize: 16}, Fields: []Type{ + {Key: StructKey{Name: "bpf_map_delete_arg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_map_delete_arg", TypeSize: 32}, Fields: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_bpf_map", FldName: "map", TypeSize: 4}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 4}}, IsPad: true}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "key", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "value", TypeSize: 8}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "flags", TypeSize: 8}}}, }}}, {Key: StructKey{Name: "bpf_map_get_fd_by_id_arg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_map_get_fd_by_id_arg", TypeSize: 12}, Fields: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "bpf_map_id", FldName: "map_id", TypeSize: 4}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "next_id", TypeSize: 4}}}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bpf_open_flags", FldName: "open_flags", TypeSize: 4}}, Vals: []uint64{8, 16}, BitMask: true}, }}}, - {Key: StructKey{Name: "bpf_map_get_next_arg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_map_get_next_arg", TypeSize: 24}, Fields: []Type{ + {Key: StructKey{Name: "bpf_map_get_next_arg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_map_get_next_arg", TypeSize: 32}, Fields: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_bpf_map", FldName: "map", TypeSize: 4}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 4}}, IsPad: true}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "key", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "next", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", ArgDir: 1, IsVarlen: true}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "flags", TypeSize: 8}}}, }}}, {Key: StructKey{Name: "bpf_map_info", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_map_info", TypeSize: 40, ArgDir: 1}, Fields: []Type{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "type", TypeSize: 4, ArgDir: 1}}}, @@ -1242,11 +1244,12 @@ var structDescs_ppc64le = []*KeyedStruct{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "map_flags", TypeSize: 4, ArgDir: 1}}}, &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "name", TypeSize: 16, ArgDir: 1}, Kind: 1, RangeBegin: 16, RangeEnd: 16}, }, AlignAttr: 8}}, - {Key: StructKey{Name: "bpf_map_lookup_arg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_map_lookup_arg", TypeSize: 24}, Fields: []Type{ + {Key: StructKey{Name: "bpf_map_lookup_arg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_map_lookup_arg", TypeSize: 32}, Fields: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_bpf_map", FldName: "map", TypeSize: 4}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 4}}, IsPad: true}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "key", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "val", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", ArgDir: 1, IsVarlen: true}}}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bpf_lookup_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{4}, BitMask: true}, }}}, {Key: StructKey{Name: "bpf_map_update_arg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_map_update_arg", TypeSize: 32}, Fields: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_bpf_map", FldName: "map", TypeSize: 4}}, @@ -1260,15 +1263,20 @@ var structDescs_ppc64le = []*KeyedStruct{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "fd", TypeSize: 4}}}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bpf_open_flags", FldName: "file_flags", TypeSize: 4}}, Vals: []uint64{8, 16}, BitMask: true}, }}}, + {Key: StructKey{Name: "bpf_obj_get_next_id_arg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_obj_get_next_id_arg", TypeSize: 12}, Fields: []Type{ + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "start", TypeSize: 4}}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "next", TypeSize: 4}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "flags", TypeSize: 4}}}, + }}}, {Key: StructKey{Name: "bpf_obj_pin_map"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_obj_pin_map", TypeSize: 16}, Fields: []Type{ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "path", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename", IsVarlen: true}, Kind: 3}}, &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_bpf_map", FldName: "fd", TypeSize: 4}}, - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 4}}, IsPad: true}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "flags", TypeSize: 4}}}, }}}, {Key: StructKey{Name: "bpf_obj_pin_prog"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_obj_pin_prog", TypeSize: 16}, Fields: []Type{ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "path", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename", IsVarlen: true}, Kind: 3}}, &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_bpf_prog", FldName: "fd", TypeSize: 4}}, - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 4}}, IsPad: true}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "flags", TypeSize: 4}}}, }}}, {Key: StructKey{Name: "bpf_options"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_options", IsVarlen: true}, Fields: []Type{ &StructType{Key: StructKey{Name: "fs_opt[\"mode\", fmt[oct, int32]]"}, FldName: "mode"}, @@ -1295,6 +1303,11 @@ var structDescs_ppc64le = []*KeyedStruct{ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "line_info_cnt", TypeSize: 4}}, Path: []string{"line_info"}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 4}}, IsPad: true}, }}}, + {Key: StructKey{Name: "bpf_prog_get_fd_by_id_arg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_prog_get_fd_by_id_arg", TypeSize: 12}, Fields: []Type{ + &ResourceType{TypeCommon: TypeCommon{TypeName: "bpf_prog_id", FldName: "prog", TypeSize: 4}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "next", TypeSize: 4}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "flags", TypeSize: 4}}}, + }}}, {Key: StructKey{Name: "bpf_prog_info", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_prog_info", TypeSize: 192, ArgDir: 1}, Fields: []Type{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "type", TypeSize: 4, ArgDir: 1}}}, &ResourceType{TypeCommon: TypeCommon{TypeName: "bpf_prog_id", FldName: "id", TypeSize: 4, ArgDir: 1}}, @@ -1354,15 +1367,19 @@ var structDescs_ppc64le = []*KeyedStruct{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "probe_offset", TypeSize: 8, ArgDir: 2}}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "probe_addr", TypeSize: 8, ArgDir: 2}}}, }}}, - {Key: StructKey{Name: "bpf_test_prog_arg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_test_prog_arg", TypeSize: 40}, Fields: []Type{ + {Key: StructKey{Name: "bpf_test_prog_arg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "bpf_test_prog_arg", TypeSize: 64}, Fields: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_bpf_prog", FldName: "prog", TypeSize: 4}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "retval", TypeSize: 4}}}, - &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "insize", TypeSize: 4}}, Path: []string{"indata"}}, - &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "outsize", TypeSize: 4}}, Path: []string{"outdata"}}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "insizedata", TypeSize: 4}}, Path: []string{"indata"}}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "outsizedata", TypeSize: 4}}, Path: []string{"outdata"}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "indata", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "outdata", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", ArgDir: 1, IsVarlen: true}}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "repeat", TypeSize: 4}}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "dur", TypeSize: 4}}}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "insizectx", TypeSize: 4}}, Path: []string{"inctx"}}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "outsizectx", TypeSize: 4}}, Path: []string{"outctx"}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "inctx", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "outctx", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}}}, }}}, {Key: StructKey{Name: "br_policy"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "br_policy", IsVarlen: true}, Fields: []Type{ &StructType{Key: StructKey{Name: "nlattr_t[const[IFLA_BR_FORWARD_DELAY, int16], int32[2:30]]"}, FldName: "IFLA_BR_FORWARD_DELAY"}, @@ -30298,7 +30315,7 @@ var syscalls_ppc64le = []*Syscall{ }, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_bpf_map", FldName: "ret", TypeSize: 4, ArgDir: 1}}}, {NR: 361, Name: "bpf$BPF_MAP_GET_NEXT_ID", CallName: "bpf", Args: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 12}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "bpf_obj_get_next_id_arg"}}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "size", TypeSize: 8}}, Path: []string{"arg"}}, }}, {NR: 361, Name: "bpf$BPF_MAP_LOOKUP_AND_DELETE_ELEM", CallName: "bpf", Args: []Type{ @@ -30318,12 +30335,12 @@ var syscalls_ppc64le = []*Syscall{ }}, {NR: 361, Name: "bpf$BPF_PROG_GET_FD_BY_ID", CallName: "bpf", Args: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 13}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &ResourceType{TypeCommon: TypeCommon{TypeName: "bpf_prog_id", TypeSize: 4}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "bpf_prog_get_fd_by_id_arg"}}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "size", TypeSize: 8}}, Path: []string{"arg"}}, }, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_bpf_prog", FldName: "ret", TypeSize: 4, ArgDir: 1}}}, {NR: 361, Name: "bpf$BPF_PROG_GET_NEXT_ID", CallName: "bpf", Args: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 11}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "bpf_obj_get_next_id_arg"}}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "size", TypeSize: 8}}, Path: []string{"arg"}}, }}, {NR: 361, Name: "bpf$BPF_PROG_QUERY", CallName: "bpf", Args: []Type{ @@ -52433,4 +52450,4 @@ var consts_ppc64le = []ConstValue{ {Name: "bpf_insn_load_imm_dw", Value: 24}, } -const revision_ppc64le = "9248c813f01d026ac73fe1a25838955c77f804d7" +const revision_ppc64le = "19f8ddcb98e80297907590d2902c37d63e1f9980" |
