From 0e8428d26ffd80789aa83442676e6fb800e9c0ff Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Thu, 23 Jan 2020 14:07:01 +0100 Subject: [PATCH] tools/syz-check: add limited checking of varlen structs Stop at the fist varlen field, but check the preceeding ones. Frequently the varlen array is the last field, so we should get good checking for these cases. Update #590 --- executor/defs.h | 12 ++++++------ sys/linux/dev_binder.txt.warn | 9 --------- sys/linux/dev_infiniband_rdma.txt | 3 +-- sys/linux/dev_infiniband_rdma.txt.warn | 6 ++++++ sys/linux/dev_infiniband_rdma_cm.txt.warn | 8 -------- sys/linux/dev_nbd.txt.warn | 1 + sys/linux/dev_sg.txt.warn | 1 + sys/linux/devio.txt.warn | 10 ---------- sys/linux/fscrypt.txt.warn | 1 + sys/linux/gen/386.go | 16 +++++++--------- sys/linux/gen/amd64.go | 16 +++++++--------- sys/linux/gen/arm.go | 16 +++++++--------- sys/linux/gen/arm64.go | 16 +++++++--------- sys/linux/gen/mips64le.go | 16 +++++++--------- sys/linux/gen/ppc64le.go | 16 +++++++--------- sys/linux/netfilter.txt.warn | 5 ----- sys/linux/netfilter_arp.txt.warn | 11 +++++++++++ sys/linux/netfilter_bridge.txt.warn | 3 +++ sys/linux/socket.txt.warn | 12 ++---------- sys/linux/socket_ax25.txt.warn | 1 - sys/linux/socket_bluetooth.txt.warn | 1 - sys/linux/socket_caif.txt.warn | 3 --- sys/linux/socket_inet_tcp.txt.warn | 3 --- sys/linux/socket_netlink.txt.warn | 5 ----- sys/linux/socket_netlink_route_sched.txt.warn | 11 +++++++++++ sys/linux/socket_rose.txt.warn | 1 - sys/linux/socket_rxrpc.txt.warn | 4 ---- sys/linux/socket_tipc.txt.warn | 6 ------ sys/linux/socket_unix.txt.warn | 3 --- sys/linux/socket_x25.txt.warn | 1 - sys/linux/vnet.txt.warn | 3 ++- sys/linux/vusb.txt.warn | 7 +++++++ sys/linux/xattr.txt | 15 ++++++++------- tools/syz-check/check.go | 19 +++++++++++++------ 34 files changed, 115 insertions(+), 146 deletions(-) diff --git a/executor/defs.h b/executor/defs.h index f45e8f83..b3b976d2 100644 --- a/executor/defs.h +++ b/executor/defs.h @@ -70,7 +70,7 @@ #if GOARCH_386 #define GOARCH "386" -#define SYZ_REVISION "6464d5dfeaed57f20a0d2951f3ef4903498f2694" +#define SYZ_REVISION "27b3cfbd601e2dbf2da3fb4ec5e7ea85e7853be9" #define SYZ_EXECUTOR_USES_FORK_SERVER 1 #define SYZ_EXECUTOR_USES_SHMEM 1 #define SYZ_PAGE_SIZE 4096 @@ -80,7 +80,7 @@ #if GOARCH_amd64 #define GOARCH "amd64" -#define SYZ_REVISION "3b6f0c6a1268866f40cac6fca1ca2ce1a926630e" +#define SYZ_REVISION "bb4413005f160aa76158144acc704b963393b213" #define SYZ_EXECUTOR_USES_FORK_SERVER 1 #define SYZ_EXECUTOR_USES_SHMEM 1 #define SYZ_PAGE_SIZE 4096 @@ -90,7 +90,7 @@ #if GOARCH_arm #define GOARCH "arm" -#define SYZ_REVISION "d0338eb41251155445d409f0d74e2e331d708856" +#define SYZ_REVISION "24411766192553258d7072e7d4fcb4770d028c75" #define SYZ_EXECUTOR_USES_FORK_SERVER 1 #define SYZ_EXECUTOR_USES_SHMEM 1 #define SYZ_PAGE_SIZE 4096 @@ -100,7 +100,7 @@ #if GOARCH_arm64 #define GOARCH "arm64" -#define SYZ_REVISION "dfd4ca0934b29aa601aec7c298c5ace6723a8e4f" +#define SYZ_REVISION "8b29eb307531d68fb9898a0fa4d30c2f41fa6971" #define SYZ_EXECUTOR_USES_FORK_SERVER 1 #define SYZ_EXECUTOR_USES_SHMEM 1 #define SYZ_PAGE_SIZE 4096 @@ -110,7 +110,7 @@ #if GOARCH_mips64le #define GOARCH "mips64le" -#define SYZ_REVISION "5360b04840bacecfb272cf0f6411262ec90fb03f" +#define SYZ_REVISION "5d42d46572f1dbf8d4002b29a88301cb4fde6845" #define SYZ_EXECUTOR_USES_FORK_SERVER 1 #define SYZ_EXECUTOR_USES_SHMEM 1 #define SYZ_PAGE_SIZE 4096 @@ -120,7 +120,7 @@ #if GOARCH_ppc64le #define GOARCH "ppc64le" -#define SYZ_REVISION "f708f25855574e76480f5b21756f972a42fa74bc" +#define SYZ_REVISION "35f2bcf13af48b949fcd39cfc088a58c4afa7300" #define SYZ_EXECUTOR_USES_FORK_SERVER 1 #define SYZ_EXECUTOR_USES_SHMEM 1 #define SYZ_PAGE_SIZE 4096 diff --git a/sys/linux/dev_binder.txt.warn b/sys/linux/dev_binder.txt.warn index abfeea3e..49befc19 100644 --- a/sys/linux/dev_binder.txt.warn +++ b/sys/linux/dev_binder.txt.warn @@ -16,15 +16,6 @@ bad-field-offset: binder_transaction_data.data_size/offsets_size: syz=32 kernel= bad-field-offset: binder_transaction_data.offsets_size/data: syz=40 kernel=48 bad-field-size: binder_transaction_data.offsets_size/data: syz=8 kernel=16 no-such-struct: binder_offsets -bad-field-size: flat_binder_object.binder/hdr: syz=24 kernel=4 -bad-field-offset: flat_binder_object.weak_binder/flags: syz=24 kernel=4 -bad-field-offset: flat_binder_object.handle/: syz=48 kernel=8 -bad-field-size: flat_binder_object.handle/: syz=20 kernel=8 [386] -bad-field-size: flat_binder_object.handle/: syz=24 kernel=8 [amd64,arm,arm64] -bad-field-offset: flat_binder_object.weak_handle/cookie: syz=68 kernel=16 [386] -bad-field-offset: flat_binder_object.weak_handle/cookie: syz=72 kernel=16 [amd64,arm,arm64] -bad-field-size: flat_binder_object.weak_handle/cookie: syz=20 kernel=8 [386] -bad-field-size: flat_binder_object.weak_handle/cookie: syz=24 kernel=8 [amd64,arm,arm64] no-such-struct: flat_binder_object_t bad-field-number: binder_fd_object: syz=5 kernel=4 bad-field-size: binder_fd_object.fd/: syz=4 kernel=8 diff --git a/sys/linux/dev_infiniband_rdma.txt b/sys/linux/dev_infiniband_rdma.txt index 38857a5c..6853a28c 100644 --- a/sys/linux/dev_infiniband_rdma.txt +++ b/sys/linux/dev_infiniband_rdma.txt @@ -1268,8 +1268,7 @@ ib_uverbs_flow_attr { size bytesize[flow_specs, int16] priority int16[0:7] num_of_specs len[flow_specs, int8] - reserved1 const[0x0, int8] - reserved2 const[0x0, int8] + reserved array[const[0x0, int8], 2] port int8 flags flags[ib_flow_flags, int32] flow_specs array[union_ib_flow_spec] diff --git a/sys/linux/dev_infiniband_rdma.txt.warn b/sys/linux/dev_infiniband_rdma.txt.warn index 0d1fe0b3..ecd0eba4 100644 --- a/sys/linux/dev_infiniband_rdma.txt.warn +++ b/sys/linux/dev_infiniband_rdma.txt.warn @@ -114,6 +114,12 @@ bad-field-size: ib_uverbs_flow_spec_action_count.size/handle: syz=2 kernel=4 bad-field-offset: ib_uverbs_flow_spec_action_count.reserved0/reserved1: syz=6 kernel=12 bad-field-size: ib_uverbs_flow_spec_action_count.reserved0/reserved1: syz=2 kernel=4 no-such-struct: union_ib_flow_spec +bad-field-size: ib_uverbs_flow_attr.reserved1/reserved: syz=1 kernel=2 +bad-field-offset: ib_uverbs_flow_attr.reserved2/port: syz=10 kernel=11 +bad-field-offset: ib_uverbs_flow_attr.port/flags: syz=11 kernel=12 +bad-field-size: ib_uverbs_flow_attr.port/flags: syz=1 kernel=4 +bad-field-offset: ib_uverbs_flow_attr.flags/flow_specs: syz=12 kernel=16 +bad-field-size: ib_uverbs_flow_attr.flags/flow_specs: syz=4 kernel=0 no-such-struct: create_flow_resp no-such-struct: destroy_flow_cmd no-such-struct: ib_uverbs_create_counters_cmd diff --git a/sys/linux/dev_infiniband_rdma_cm.txt.warn b/sys/linux/dev_infiniband_rdma_cm.txt.warn index dbda9a41..3f40ef5b 100644 --- a/sys/linux/dev_infiniband_rdma_cm.txt.warn +++ b/sys/linux/dev_infiniband_rdma_cm.txt.warn @@ -3,13 +3,5 @@ no-such-struct: rdma_ucm_create_mcast_id_resp no-such-struct: rdma_ucm_leave_mcast bad-field-number: rdma_ucm_event_resp: syz=2 kernel=6 bad-field-size: rdma_ucm_event_resp.id: syz=8 kernel=4 -bad-field-number: rdma_ucm_set_option: syz=4 kernel=5 -bad-field-size: rdma_ucm_set_option.id_tos/optval: syz=24 kernel=8 -bad-field-offset: rdma_ucm_set_option.id_resuseaddr/id: syz=24 kernel=8 -bad-field-size: rdma_ucm_set_option.id_resuseaddr/id: syz=24 kernel=4 -bad-field-offset: rdma_ucm_set_option.id_afonly/level: syz=48 kernel=12 -bad-field-size: rdma_ucm_set_option.id_afonly/level: syz=24 kernel=4 -bad-field-offset: rdma_ucm_set_option.ib_path/optname: syz=72 kernel=16 -bad-field-size: rdma_ucm_set_option.ib_path/optname: syz=24 kernel=4 no-such-struct: rdma_ucm_set_option_t no-such-struct: sockaddr_rdma_cm diff --git a/sys/linux/dev_nbd.txt.warn b/sys/linux/dev_nbd.txt.warn index b560e8a9..8662879e 100644 --- a/sys/linux/dev_nbd.txt.warn +++ b/sys/linux/dev_nbd.txt.warn @@ -1,2 +1,3 @@ bad-netlink-attr: nbd_attr_policy: missing attributes: [9] no-such-struct: nbd_sock_pair +bad-field-size: nbd_reply.handle_tag/handle: syz=2 kernel=8 diff --git a/sys/linux/dev_sg.txt.warn b/sys/linux/dev_sg.txt.warn index 27ec6d0b..2e24c01d 100644 --- a/sys/linux/dev_sg.txt.warn +++ b/sys/linux/dev_sg.txt.warn @@ -44,3 +44,4 @@ bad-field-offset: sg_io_hdr.info/resid: syz=76 kernel=72 [amd64,arm64] no-such-struct: sg_io_hdr_data no-such-struct: sg_io_hdr_data_buffer no-such-struct: sg_io_hdr_data_scatter +bad-field-size: scsi_ioctl_command.opcode/data: syz=4 kernel=0 diff --git a/sys/linux/devio.txt.warn b/sys/linux/devio.txt.warn index 5275eabc..e0882cb8 100644 --- a/sys/linux/devio.txt.warn +++ b/sys/linux/devio.txt.warn @@ -2,16 +2,6 @@ no-such-struct: usbdevfs_ep no-such-struct: usbdevfs_urb_control no-such-struct: usbdevfs_urb_bulk no-such-struct: usbdevfs_urb_interrupt -bad-field-size: usbdevfs_ioctl.usbdevfs_disconnect/ifno: syz=12 kernel=4 [386,arm] -bad-field-size: usbdevfs_ioctl.usbdevfs_disconnect/ifno: syz=16 kernel=4 [amd64,arm64] -bad-field-offset: usbdevfs_ioctl.usbdevfs_connect/ioctl_code: syz=12 kernel=4 [386,arm] -bad-field-offset: usbdevfs_ioctl.usbdevfs_connect/ioctl_code: syz=16 kernel=4 [amd64,arm64] -bad-field-size: usbdevfs_ioctl.usbdevfs_connect/ioctl_code: syz=12 kernel=4 [386,arm] -bad-field-size: usbdevfs_ioctl.usbdevfs_connect/ioctl_code: syz=16 kernel=4 [amd64,arm64] -bad-field-offset: usbdevfs_ioctl.usbdevfs_driver/data: syz=24 kernel=8 [386,arm] -bad-field-offset: usbdevfs_ioctl.usbdevfs_driver/data: syz=32 kernel=8 [amd64,arm64] -bad-field-size: usbdevfs_ioctl.usbdevfs_driver/data: syz=12 kernel=4 [386,arm] -bad-field-size: usbdevfs_ioctl.usbdevfs_driver/data: syz=16 kernel=8 [amd64,arm64] no-such-struct: usbdevfs_ioctl_disconnect no-such-struct: usbdevfs_ioctl_connect no-such-struct: usbdevfs_ioctl_driver diff --git a/sys/linux/fscrypt.txt.warn b/sys/linux/fscrypt.txt.warn index 7f46ada8..31fad08e 100644 --- a/sys/linux/fscrypt.txt.warn +++ b/sys/linux/fscrypt.txt.warn @@ -13,3 +13,4 @@ bad-field-size: fscrypt_policy_v2.master_key_identifier/__reserved: syz=16 kerne no-such-struct: fscrypt_policy_modes no-such-struct: fscrypt_policy_mode_t no-such-struct: fscrypt_key_specifier_payload +bad-field-size: fscrypt_add_key_arg.reserved/key_id: syz=36 kernel=4 diff --git a/sys/linux/gen/386.go b/sys/linux/gen/386.go index b848a234..6ecec456 100644 --- a/sys/linux/gen/386.go +++ b/sys/linux/gen/386.go @@ -8454,8 +8454,7 @@ var structDescs_386 = []*KeyedStruct{ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "size", TypeSize: 2, ArgDir: 2}}, BitSize: 8, Path: []string{"flow_specs"}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "priority", TypeSize: 2, ArgDir: 2}}, Kind: 1, RangeEnd: 7}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "num_of_specs", TypeSize: 1, ArgDir: 2}}, Path: []string{"flow_specs"}}, - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "reserved1", TypeSize: 1, ArgDir: 2}}}, - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "reserved2", TypeSize: 1, ArgDir: 2}}}, + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "reserved", TypeSize: 2, ArgDir: 2}, Type: &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", TypeSize: 1, ArgDir: 2}}}, Kind: 1, RangeBegin: 2, RangeEnd: 2}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "port", TypeSize: 1, ArgDir: 2}}}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ib_flow_flags", FldName: "flags", TypeSize: 4, ArgDir: 2}}, Vals: []uint64{2}, BitMask: true}, &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "flow_specs", ArgDir: 2, IsVarlen: true}, Type: &UnionType{Key: StructKey{Name: "union_ib_flow_spec", Dir: 2}}}, @@ -34681,11 +34680,11 @@ var structDescs_386 = []*KeyedStruct{ &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "metacopy_on", TypeSize: 11}, Kind: 2, Values: []string{"metacopy=on"}, NoZ: true}, &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "metacopy_off", TypeSize: 12}, Kind: 2, Values: []string{"metacopy=off"}, NoZ: true}, }}}, - {Key: StructKey{Name: "ovl_fh"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "ovl_fh", IsVarlen: true}, Fields: []Type{ + {Key: StructKey{Name: "ovl_fb"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "ovl_fb", IsVarlen: true}, Fields: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "version", TypeSize: 1}}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "magic", TypeSize: 1}}, Val: 251}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "len", TypeSize: 1}}, BitSize: 8, Path: []string{"parent"}}, - &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ovl_fh_flags", FldName: "flags", TypeSize: 1}}, Vals: []uint64{1, 2, 4}, BitMask: true}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ovl_fb_flags", FldName: "flags", TypeSize: 1}}, Vals: []uint64{1, 2, 4}, BitMask: true}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "type", TypeSize: 1}}}, &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "uuid", TypeSize: 16}, Kind: 1, RangeBegin: 16, RangeEnd: 16}, &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "fid", IsVarlen: true}}, @@ -37364,7 +37363,6 @@ var structDescs_386 = []*KeyedStruct{ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "evm_xattr_type", FldName: "type", TypeSize: 1}}, Vals: []uint64{3, 5}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "version", TypeSize: 1}}, Kind: 1, RangeEnd: 3}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "hash_algo", TypeSize: 1}}, Kind: 1, RangeEnd: 20}, - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 1}}, IsPad: true}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32be", FldName: "keyid", TypeSize: 4}, ArgFormat: 1}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "sig_size", TypeSize: 2}, ArgFormat: 1}, BitSize: 8, Path: []string{"sig"}}, &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "sig", IsVarlen: true}}, @@ -48263,7 +48261,7 @@ var syscalls_386 = []*Syscall{ {NR: 228, Name: "fsetxattr$trusted_overlay_upper", CallName: "fsetxattr", Args: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "fd", TypeSize: 4}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "name", TypeSize: 4}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "string", TypeSize: 22}, Kind: 2, Values: []string{"trusted.overlay.upper\x00"}}}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "val", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "ovl_fh"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "val", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "ovl_fb"}}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "size", TypeSize: 4}}, Path: []string{"val"}}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "setxattr_flags", FldName: "flags", TypeSize: 4}}, Vals: []uint64{1, 2}, BitMask: true}, }}, @@ -56449,7 +56447,7 @@ var syscalls_386 = []*Syscall{ {NR: 227, Name: "lsetxattr$trusted_overlay_upper", CallName: "lsetxattr", Args: []Type{ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "path", TypeSize: 4}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename", IsVarlen: true}, Kind: 3}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "name", TypeSize: 4}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "string", TypeSize: 22}, Kind: 2, Values: []string{"trusted.overlay.upper\x00"}}}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "val", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "ovl_fh"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "val", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "ovl_fb"}}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "size", TypeSize: 4}}, Path: []string{"val"}}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "setxattr_flags", FldName: "flags", TypeSize: 4}}, Vals: []uint64{1, 2}, BitMask: true}, }}, @@ -62354,7 +62352,7 @@ var syscalls_386 = []*Syscall{ {NR: 226, Name: "setxattr$trusted_overlay_upper", CallName: "setxattr", Args: []Type{ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "path", TypeSize: 4}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename", IsVarlen: true}, Kind: 3}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "name", TypeSize: 4}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "string", TypeSize: 22}, Kind: 2, Values: []string{"trusted.overlay.upper\x00"}}}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "val", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "ovl_fh"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "val", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "ovl_fb"}}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "size", TypeSize: 4}}, Path: []string{"val"}}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "setxattr_flags", FldName: "flags", TypeSize: 4}}, Vals: []uint64{1, 2}, BitMask: true}, }}, @@ -74500,4 +74498,4 @@ var consts_386 = []ConstValue{ {Name: "bpf_insn_load_imm_dw", Value: 24}, } -const revision_386 = "6464d5dfeaed57f20a0d2951f3ef4903498f2694" +const revision_386 = "27b3cfbd601e2dbf2da3fb4ec5e7ea85e7853be9" diff --git a/sys/linux/gen/amd64.go b/sys/linux/gen/amd64.go index 0eef79e6..56956a6c 100644 --- a/sys/linux/gen/amd64.go +++ b/sys/linux/gen/amd64.go @@ -8597,8 +8597,7 @@ var structDescs_amd64 = []*KeyedStruct{ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "size", TypeSize: 2, ArgDir: 2}}, BitSize: 8, Path: []string{"flow_specs"}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "priority", TypeSize: 2, ArgDir: 2}}, Kind: 1, RangeEnd: 7}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "num_of_specs", TypeSize: 1, ArgDir: 2}}, Path: []string{"flow_specs"}}, - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "reserved1", TypeSize: 1, ArgDir: 2}}}, - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "reserved2", TypeSize: 1, ArgDir: 2}}}, + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "reserved", TypeSize: 2, ArgDir: 2}, Type: &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", TypeSize: 1, ArgDir: 2}}}, Kind: 1, RangeBegin: 2, RangeEnd: 2}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "port", TypeSize: 1, ArgDir: 2}}}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ib_flow_flags", FldName: "flags", TypeSize: 4, ArgDir: 2}}, Vals: []uint64{2}, BitMask: true}, &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "flow_specs", ArgDir: 2, IsVarlen: true}, Type: &UnionType{Key: StructKey{Name: "union_ib_flow_spec", Dir: 2}}}, @@ -35338,11 +35337,11 @@ var structDescs_amd64 = []*KeyedStruct{ &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "metacopy_on", TypeSize: 11}, Kind: 2, Values: []string{"metacopy=on"}, NoZ: true}, &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "metacopy_off", TypeSize: 12}, Kind: 2, Values: []string{"metacopy=off"}, NoZ: true}, }}}, - {Key: StructKey{Name: "ovl_fh"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "ovl_fh", IsVarlen: true}, Fields: []Type{ + {Key: StructKey{Name: "ovl_fb"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "ovl_fb", IsVarlen: true}, Fields: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "version", TypeSize: 1}}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "magic", TypeSize: 1}}, Val: 251}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "len", TypeSize: 1}}, BitSize: 8, Path: []string{"parent"}}, - &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ovl_fh_flags", FldName: "flags", TypeSize: 1}}, Vals: []uint64{1, 2, 4}, BitMask: true}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ovl_fb_flags", FldName: "flags", TypeSize: 1}}, Vals: []uint64{1, 2, 4}, BitMask: true}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "type", TypeSize: 1}}}, &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "uuid", TypeSize: 16}, Kind: 1, RangeBegin: 16, RangeEnd: 16}, &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "fid", IsVarlen: true}}, @@ -38051,7 +38050,6 @@ var structDescs_amd64 = []*KeyedStruct{ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "evm_xattr_type", FldName: "type", TypeSize: 1}}, Vals: []uint64{3, 5}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "version", TypeSize: 1}}, Kind: 1, RangeEnd: 3}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "hash_algo", TypeSize: 1}}, Kind: 1, RangeEnd: 20}, - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 1}}, IsPad: true}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32be", FldName: "keyid", TypeSize: 4}, ArgFormat: 1}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "sig_size", TypeSize: 2}, ArgFormat: 1}, BitSize: 8, Path: []string{"sig"}}, &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "sig", IsVarlen: true}}, @@ -49162,7 +49160,7 @@ var syscalls_amd64 = []*Syscall{ {NR: 190, Name: "fsetxattr$trusted_overlay_upper", CallName: "fsetxattr", Args: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "fd", TypeSize: 4}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "name", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "string", TypeSize: 22}, Kind: 2, Values: []string{"trusted.overlay.upper\x00"}}}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "val", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "ovl_fh"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "val", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "ovl_fb"}}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "size", TypeSize: 8}}, Path: []string{"val"}}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "setxattr_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{1, 2}, BitMask: true}, }}, @@ -57373,7 +57371,7 @@ var syscalls_amd64 = []*Syscall{ {NR: 189, Name: "lsetxattr$trusted_overlay_upper", CallName: "lsetxattr", Args: []Type{ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "path", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename", IsVarlen: true}, Kind: 3}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "name", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "string", TypeSize: 22}, Kind: 2, Values: []string{"trusted.overlay.upper\x00"}}}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "val", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "ovl_fh"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "val", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "ovl_fb"}}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "size", TypeSize: 8}}, Path: []string{"val"}}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "setxattr_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{1, 2}, BitMask: true}, }}, @@ -63285,7 +63283,7 @@ var syscalls_amd64 = []*Syscall{ {NR: 188, Name: "setxattr$trusted_overlay_upper", CallName: "setxattr", Args: []Type{ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "path", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename", IsVarlen: true}, Kind: 3}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "name", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "string", TypeSize: 22}, Kind: 2, Values: []string{"trusted.overlay.upper\x00"}}}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "val", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "ovl_fh"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "val", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "ovl_fb"}}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "size", TypeSize: 8}}, Path: []string{"val"}}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "setxattr_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{1, 2}, BitMask: true}, }}, @@ -75441,4 +75439,4 @@ var consts_amd64 = []ConstValue{ {Name: "bpf_insn_load_imm_dw", Value: 24}, } -const revision_amd64 = "3b6f0c6a1268866f40cac6fca1ca2ce1a926630e" +const revision_amd64 = "bb4413005f160aa76158144acc704b963393b213" diff --git a/sys/linux/gen/arm.go b/sys/linux/gen/arm.go index a21acb14..4c21b7fc 100644 --- a/sys/linux/gen/arm.go +++ b/sys/linux/gen/arm.go @@ -8487,8 +8487,7 @@ var structDescs_arm = []*KeyedStruct{ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "size", TypeSize: 2, ArgDir: 2}}, BitSize: 8, Path: []string{"flow_specs"}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "priority", TypeSize: 2, ArgDir: 2}}, Kind: 1, RangeEnd: 7}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "num_of_specs", TypeSize: 1, ArgDir: 2}}, Path: []string{"flow_specs"}}, - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "reserved1", TypeSize: 1, ArgDir: 2}}}, - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "reserved2", TypeSize: 1, ArgDir: 2}}}, + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "reserved", TypeSize: 2, ArgDir: 2}, Type: &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", TypeSize: 1, ArgDir: 2}}}, Kind: 1, RangeBegin: 2, RangeEnd: 2}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "port", TypeSize: 1, ArgDir: 2}}}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ib_flow_flags", FldName: "flags", TypeSize: 4, ArgDir: 2}}, Vals: []uint64{2}, BitMask: true}, &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "flow_specs", ArgDir: 2, IsVarlen: true}, Type: &UnionType{Key: StructKey{Name: "union_ib_flow_spec", Dir: 2}}}, @@ -34540,11 +34539,11 @@ var structDescs_arm = []*KeyedStruct{ &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "metacopy_on", TypeSize: 11}, Kind: 2, Values: []string{"metacopy=on"}, NoZ: true}, &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "metacopy_off", TypeSize: 12}, Kind: 2, Values: []string{"metacopy=off"}, NoZ: true}, }}}, - {Key: StructKey{Name: "ovl_fh"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "ovl_fh", IsVarlen: true}, Fields: []Type{ + {Key: StructKey{Name: "ovl_fb"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "ovl_fb", IsVarlen: true}, Fields: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "version", TypeSize: 1}}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "magic", TypeSize: 1}}, Val: 251}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "len", TypeSize: 1}}, BitSize: 8, Path: []string{"parent"}}, - &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ovl_fh_flags", FldName: "flags", TypeSize: 1}}, Vals: []uint64{1, 2, 4}, BitMask: true}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ovl_fb_flags", FldName: "flags", TypeSize: 1}}, Vals: []uint64{1, 2, 4}, BitMask: true}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "type", TypeSize: 1}}}, &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "uuid", TypeSize: 16}, Kind: 1, RangeBegin: 16, RangeEnd: 16}, &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "fid", IsVarlen: true}}, @@ -37241,7 +37240,6 @@ var structDescs_arm = []*KeyedStruct{ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "evm_xattr_type", FldName: "type", TypeSize: 1}}, Vals: []uint64{3, 5}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "version", TypeSize: 1}}, Kind: 1, RangeEnd: 3}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "hash_algo", TypeSize: 1}}, Kind: 1, RangeEnd: 20}, - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 1}}, IsPad: true}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32be", FldName: "keyid", TypeSize: 4}, ArgFormat: 1}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "sig_size", TypeSize: 2}, ArgFormat: 1}, BitSize: 8, Path: []string{"sig"}}, &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "sig", IsVarlen: true}}, @@ -48153,7 +48151,7 @@ var syscalls_arm = []*Syscall{ {NR: 228, Name: "fsetxattr$trusted_overlay_upper", CallName: "fsetxattr", Args: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "fd", TypeSize: 4}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "name", TypeSize: 4}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "string", TypeSize: 22}, Kind: 2, Values: []string{"trusted.overlay.upper\x00"}}}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "val", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "ovl_fh"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "val", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "ovl_fb"}}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "size", TypeSize: 4}}, Path: []string{"val"}}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "setxattr_flags", FldName: "flags", TypeSize: 4}}, Vals: []uint64{1, 2}, BitMask: true}, }}, @@ -56204,7 +56202,7 @@ var syscalls_arm = []*Syscall{ {NR: 227, Name: "lsetxattr$trusted_overlay_upper", CallName: "lsetxattr", Args: []Type{ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "path", TypeSize: 4}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename", IsVarlen: true}, Kind: 3}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "name", TypeSize: 4}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "string", TypeSize: 22}, Kind: 2, Values: []string{"trusted.overlay.upper\x00"}}}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "val", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "ovl_fh"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "val", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "ovl_fb"}}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "size", TypeSize: 4}}, Path: []string{"val"}}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "setxattr_flags", FldName: "flags", TypeSize: 4}}, Vals: []uint64{1, 2}, BitMask: true}, }}, @@ -62090,7 +62088,7 @@ var syscalls_arm = []*Syscall{ {NR: 226, Name: "setxattr$trusted_overlay_upper", CallName: "setxattr", Args: []Type{ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "path", TypeSize: 4}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename", IsVarlen: true}, Kind: 3}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "name", TypeSize: 4}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "string", TypeSize: 22}, Kind: 2, Values: []string{"trusted.overlay.upper\x00"}}}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "val", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "ovl_fh"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "val", TypeSize: 4}, Type: &StructType{Key: StructKey{Name: "ovl_fb"}}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "size", TypeSize: 4}}, Path: []string{"val"}}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "setxattr_flags", FldName: "flags", TypeSize: 4}}, Vals: []uint64{1, 2}, BitMask: true}, }}, @@ -74149,4 +74147,4 @@ var consts_arm = []ConstValue{ {Name: "bpf_insn_load_imm_dw", Value: 24}, } -const revision_arm = "d0338eb41251155445d409f0d74e2e331d708856" +const revision_arm = "24411766192553258d7072e7d4fcb4770d028c75" diff --git a/sys/linux/gen/arm64.go b/sys/linux/gen/arm64.go index 889b3984..c459875b 100644 --- a/sys/linux/gen/arm64.go +++ b/sys/linux/gen/arm64.go @@ -8597,8 +8597,7 @@ var structDescs_arm64 = []*KeyedStruct{ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "size", TypeSize: 2, ArgDir: 2}}, BitSize: 8, Path: []string{"flow_specs"}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "priority", TypeSize: 2, ArgDir: 2}}, Kind: 1, RangeEnd: 7}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "num_of_specs", TypeSize: 1, ArgDir: 2}}, Path: []string{"flow_specs"}}, - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "reserved1", TypeSize: 1, ArgDir: 2}}}, - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "reserved2", TypeSize: 1, ArgDir: 2}}}, + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "reserved", TypeSize: 2, ArgDir: 2}, Type: &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", TypeSize: 1, ArgDir: 2}}}, Kind: 1, RangeBegin: 2, RangeEnd: 2}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "port", TypeSize: 1, ArgDir: 2}}}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ib_flow_flags", FldName: "flags", TypeSize: 4, ArgDir: 2}}, Vals: []uint64{2}, BitMask: true}, &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "flow_specs", ArgDir: 2, IsVarlen: true}, Type: &UnionType{Key: StructKey{Name: "union_ib_flow_spec", Dir: 2}}}, @@ -35147,11 +35146,11 @@ var structDescs_arm64 = []*KeyedStruct{ &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "metacopy_on", TypeSize: 11}, Kind: 2, Values: []string{"metacopy=on"}, NoZ: true}, &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "metacopy_off", TypeSize: 12}, Kind: 2, Values: []string{"metacopy=off"}, NoZ: true}, }}}, - {Key: StructKey{Name: "ovl_fh"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "ovl_fh", IsVarlen: true}, Fields: []Type{ + {Key: StructKey{Name: "ovl_fb"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "ovl_fb", IsVarlen: true}, Fields: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "version", TypeSize: 1}}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "magic", TypeSize: 1}}, Val: 251}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "len", TypeSize: 1}}, BitSize: 8, Path: []string{"parent"}}, - &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ovl_fh_flags", FldName: "flags", TypeSize: 1}}, Vals: []uint64{1, 2, 4}, BitMask: true}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ovl_fb_flags", FldName: "flags", TypeSize: 1}}, Vals: []uint64{1, 2, 4}, BitMask: true}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "type", TypeSize: 1}}}, &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "uuid", TypeSize: 16}, Kind: 1, RangeBegin: 16, RangeEnd: 16}, &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "fid", IsVarlen: true}}, @@ -37860,7 +37859,6 @@ var structDescs_arm64 = []*KeyedStruct{ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "evm_xattr_type", FldName: "type", TypeSize: 1}}, Vals: []uint64{3, 5}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "version", TypeSize: 1}}, Kind: 1, RangeEnd: 3}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "hash_algo", TypeSize: 1}}, Kind: 1, RangeEnd: 20}, - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 1}}, IsPad: true}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32be", FldName: "keyid", TypeSize: 4}, ArgFormat: 1}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "sig_size", TypeSize: 2}, ArgFormat: 1}, BitSize: 8, Path: []string{"sig"}}, &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "sig", IsVarlen: true}}, @@ -48883,7 +48881,7 @@ var syscalls_arm64 = []*Syscall{ {NR: 7, Name: "fsetxattr$trusted_overlay_upper", CallName: "fsetxattr", Args: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "fd", TypeSize: 4}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "name", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "string", TypeSize: 22}, Kind: 2, Values: []string{"trusted.overlay.upper\x00"}}}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "val", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "ovl_fh"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "val", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "ovl_fb"}}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "size", TypeSize: 8}}, Path: []string{"val"}}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "setxattr_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{1, 2}, BitMask: true}, }}, @@ -56945,7 +56943,7 @@ var syscalls_arm64 = []*Syscall{ {NR: 6, Name: "lsetxattr$trusted_overlay_upper", CallName: "lsetxattr", Args: []Type{ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "path", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename", IsVarlen: true}, Kind: 3}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "name", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "string", TypeSize: 22}, Kind: 2, Values: []string{"trusted.overlay.upper\x00"}}}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "val", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "ovl_fh"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "val", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "ovl_fb"}}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "size", TypeSize: 8}}, Path: []string{"val"}}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "setxattr_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{1, 2}, BitMask: true}, }}, @@ -62778,7 +62776,7 @@ var syscalls_arm64 = []*Syscall{ {NR: 5, Name: "setxattr$trusted_overlay_upper", CallName: "setxattr", Args: []Type{ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "path", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename", IsVarlen: true}, Kind: 3}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "name", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "string", TypeSize: 22}, Kind: 2, Values: []string{"trusted.overlay.upper\x00"}}}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "val", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "ovl_fh"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "val", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "ovl_fb"}}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "size", TypeSize: 8}}, Path: []string{"val"}}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "setxattr_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{1, 2}, BitMask: true}, }}, @@ -74786,4 +74784,4 @@ var consts_arm64 = []ConstValue{ {Name: "bpf_insn_load_imm_dw", Value: 24}, } -const revision_arm64 = "dfd4ca0934b29aa601aec7c298c5ace6723a8e4f" +const revision_arm64 = "8b29eb307531d68fb9898a0fa4d30c2f41fa6971" diff --git a/sys/linux/gen/mips64le.go b/sys/linux/gen/mips64le.go index e8a66e7e..ef182c8a 100644 --- a/sys/linux/gen/mips64le.go +++ b/sys/linux/gen/mips64le.go @@ -8594,8 +8594,7 @@ var structDescs_mips64le = []*KeyedStruct{ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "size", TypeSize: 2, ArgDir: 2}}, BitSize: 8, Path: []string{"flow_specs"}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "priority", TypeSize: 2, ArgDir: 2}}, Kind: 1, RangeEnd: 7}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "num_of_specs", TypeSize: 1, ArgDir: 2}}, Path: []string{"flow_specs"}}, - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "reserved1", TypeSize: 1, ArgDir: 2}}}, - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "reserved2", TypeSize: 1, ArgDir: 2}}}, + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "reserved", TypeSize: 2, ArgDir: 2}, Type: &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", TypeSize: 1, ArgDir: 2}}}, Kind: 1, RangeBegin: 2, RangeEnd: 2}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "port", TypeSize: 1, ArgDir: 2}}}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ib_flow_flags", FldName: "flags", TypeSize: 4, ArgDir: 2}}, Vals: []uint64{2}, BitMask: true}, &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "flow_specs", ArgDir: 2, IsVarlen: true}, Type: &UnionType{Key: StructKey{Name: "union_ib_flow_spec", Dir: 2}}}, @@ -35091,11 +35090,11 @@ var structDescs_mips64le = []*KeyedStruct{ &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "metacopy_on", TypeSize: 11}, Kind: 2, Values: []string{"metacopy=on"}, NoZ: true}, &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "metacopy_off", TypeSize: 12}, Kind: 2, Values: []string{"metacopy=off"}, NoZ: true}, }}}, - {Key: StructKey{Name: "ovl_fh"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "ovl_fh", IsVarlen: true}, Fields: []Type{ + {Key: StructKey{Name: "ovl_fb"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "ovl_fb", IsVarlen: true}, Fields: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "version", TypeSize: 1}}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "magic", TypeSize: 1}}, Val: 251}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "len", TypeSize: 1}}, BitSize: 8, Path: []string{"parent"}}, - &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ovl_fh_flags", FldName: "flags", TypeSize: 1}}, Vals: []uint64{1, 2, 4}, BitMask: true}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ovl_fb_flags", FldName: "flags", TypeSize: 1}}, Vals: []uint64{1, 2, 4}, BitMask: true}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "type", TypeSize: 1}}}, &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "uuid", TypeSize: 16}, Kind: 1, RangeBegin: 16, RangeEnd: 16}, &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "fid", IsVarlen: true}}, @@ -37804,7 +37803,6 @@ var structDescs_mips64le = []*KeyedStruct{ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "evm_xattr_type", FldName: "type", TypeSize: 1}}, Vals: []uint64{3, 5}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "version", TypeSize: 1}}, Kind: 1, RangeEnd: 3}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "hash_algo", TypeSize: 1}}, Kind: 1, RangeEnd: 20}, - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 1}}, IsPad: true}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32be", FldName: "keyid", TypeSize: 4}, ArgFormat: 1}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "sig_size", TypeSize: 2}, ArgFormat: 1}, BitSize: 8, Path: []string{"sig"}}, &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "sig", IsVarlen: true}}, @@ -47991,7 +47989,7 @@ var syscalls_mips64le = []*Syscall{ {NR: 5182, Name: "fsetxattr$trusted_overlay_upper", CallName: "fsetxattr", Args: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "fd", TypeSize: 4}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "name", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "string", TypeSize: 22}, Kind: 2, Values: []string{"trusted.overlay.upper\x00"}}}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "val", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "ovl_fh"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "val", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "ovl_fb"}}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "size", TypeSize: 8}}, Path: []string{"val"}}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "setxattr_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{1, 2}, BitMask: true}, }}, @@ -55511,7 +55509,7 @@ var syscalls_mips64le = []*Syscall{ {NR: 5181, Name: "lsetxattr$trusted_overlay_upper", CallName: "lsetxattr", Args: []Type{ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "path", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename", IsVarlen: true}, Kind: 3}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "name", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "string", TypeSize: 22}, Kind: 2, Values: []string{"trusted.overlay.upper\x00"}}}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "val", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "ovl_fh"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "val", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "ovl_fb"}}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "size", TypeSize: 8}}, Path: []string{"val"}}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "setxattr_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{1, 2}, BitMask: true}, }}, @@ -61396,7 +61394,7 @@ var syscalls_mips64le = []*Syscall{ {NR: 5180, Name: "setxattr$trusted_overlay_upper", CallName: "setxattr", Args: []Type{ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "path", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename", IsVarlen: true}, Kind: 3}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "name", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "string", TypeSize: 22}, Kind: 2, Values: []string{"trusted.overlay.upper\x00"}}}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "val", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "ovl_fh"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "val", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "ovl_fb"}}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "size", TypeSize: 8}}, Path: []string{"val"}}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "setxattr_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{1, 2}, BitMask: true}, }}, @@ -72409,4 +72407,4 @@ var consts_mips64le = []ConstValue{ {Name: "bpf_insn_load_imm_dw", Value: 24}, } -const revision_mips64le = "5360b04840bacecfb272cf0f6411262ec90fb03f" +const revision_mips64le = "5d42d46572f1dbf8d4002b29a88301cb4fde6845" diff --git a/sys/linux/gen/ppc64le.go b/sys/linux/gen/ppc64le.go index 891dcd9f..e2b0ce1e 100644 --- a/sys/linux/gen/ppc64le.go +++ b/sys/linux/gen/ppc64le.go @@ -8596,8 +8596,7 @@ var structDescs_ppc64le = []*KeyedStruct{ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "size", TypeSize: 2, ArgDir: 2}}, BitSize: 8, Path: []string{"flow_specs"}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "priority", TypeSize: 2, ArgDir: 2}}, Kind: 1, RangeEnd: 7}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "num_of_specs", TypeSize: 1, ArgDir: 2}}, Path: []string{"flow_specs"}}, - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "reserved1", TypeSize: 1, ArgDir: 2}}}, - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "reserved2", TypeSize: 1, ArgDir: 2}}}, + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "reserved", TypeSize: 2, ArgDir: 2}, Type: &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", TypeSize: 1, ArgDir: 2}}}, Kind: 1, RangeBegin: 2, RangeEnd: 2}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "port", TypeSize: 1, ArgDir: 2}}}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ib_flow_flags", FldName: "flags", TypeSize: 4, ArgDir: 2}}, Vals: []uint64{2}, BitMask: true}, &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "flow_specs", ArgDir: 2, IsVarlen: true}, Type: &UnionType{Key: StructKey{Name: "union_ib_flow_spec", Dir: 2}}}, @@ -35093,11 +35092,11 @@ var structDescs_ppc64le = []*KeyedStruct{ &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "metacopy_on", TypeSize: 11}, Kind: 2, Values: []string{"metacopy=on"}, NoZ: true}, &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "metacopy_off", TypeSize: 12}, Kind: 2, Values: []string{"metacopy=off"}, NoZ: true}, }}}, - {Key: StructKey{Name: "ovl_fh"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "ovl_fh", IsVarlen: true}, Fields: []Type{ + {Key: StructKey{Name: "ovl_fb"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "ovl_fb", IsVarlen: true}, Fields: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "version", TypeSize: 1}}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "magic", TypeSize: 1}}, Val: 251}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "len", TypeSize: 1}}, BitSize: 8, Path: []string{"parent"}}, - &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ovl_fh_flags", FldName: "flags", TypeSize: 1}}, Vals: []uint64{1, 2, 4}, BitMask: true}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ovl_fb_flags", FldName: "flags", TypeSize: 1}}, Vals: []uint64{1, 2, 4}, BitMask: true}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "type", TypeSize: 1}}}, &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "uuid", TypeSize: 16}, Kind: 1, RangeBegin: 16, RangeEnd: 16}, &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "fid", IsVarlen: true}}, @@ -37806,7 +37805,6 @@ var structDescs_ppc64le = []*KeyedStruct{ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "evm_xattr_type", FldName: "type", TypeSize: 1}}, Vals: []uint64{3, 5}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "version", TypeSize: 1}}, Kind: 1, RangeEnd: 3}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "hash_algo", TypeSize: 1}}, Kind: 1, RangeEnd: 20}, - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 1}}, IsPad: true}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32be", FldName: "keyid", TypeSize: 4}, ArgFormat: 1}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "sig_size", TypeSize: 2}, ArgFormat: 1}, BitSize: 8, Path: []string{"sig"}}, &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "sig", IsVarlen: true}}, @@ -48804,7 +48802,7 @@ var syscalls_ppc64le = []*Syscall{ {NR: 211, Name: "fsetxattr$trusted_overlay_upper", CallName: "fsetxattr", Args: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "fd", TypeSize: 4}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "name", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "string", TypeSize: 22}, Kind: 2, Values: []string{"trusted.overlay.upper\x00"}}}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "val", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "ovl_fh"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "val", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "ovl_fb"}}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "size", TypeSize: 8}}, Path: []string{"val"}}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "setxattr_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{1, 2}, BitMask: true}, }}, @@ -56822,7 +56820,7 @@ var syscalls_ppc64le = []*Syscall{ {NR: 210, Name: "lsetxattr$trusted_overlay_upper", CallName: "lsetxattr", Args: []Type{ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "path", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename", IsVarlen: true}, Kind: 3}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "name", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "string", TypeSize: 22}, Kind: 2, Values: []string{"trusted.overlay.upper\x00"}}}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "val", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "ovl_fh"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "val", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "ovl_fb"}}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "size", TypeSize: 8}}, Path: []string{"val"}}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "setxattr_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{1, 2}, BitMask: true}, }}, @@ -62726,7 +62724,7 @@ var syscalls_ppc64le = []*Syscall{ {NR: 209, Name: "setxattr$trusted_overlay_upper", CallName: "setxattr", Args: []Type{ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "path", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename", IsVarlen: true}, Kind: 3}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "name", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "string", TypeSize: 22}, Kind: 2, Values: []string{"trusted.overlay.upper\x00"}}}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "val", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "ovl_fh"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "val", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "ovl_fb"}}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "size", TypeSize: 8}}, Path: []string{"val"}}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "setxattr_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{1, 2}, BitMask: true}, }}, @@ -74745,4 +74743,4 @@ var consts_ppc64le = []ConstValue{ {Name: "bpf_insn_load_imm_dw", Value: 24}, } -const revision_ppc64le = "f708f25855574e76480f5b21756f972a42fa74bc" +const revision_ppc64le = "35f2bcf13af48b949fcd39cfc088a58c4afa7300" diff --git a/sys/linux/netfilter.txt.warn b/sys/linux/netfilter.txt.warn index c964efe6..d26b026a 100644 --- a/sys/linux/netfilter.txt.warn +++ b/sys/linux/netfilter.txt.warn @@ -9,11 +9,6 @@ bad-field-size: xt_cgroup_info_v1.priv: syz=8 kernel=4 [386,arm] bad-field-size: xt_rateest_match_info.est1: syz=8 kernel=4 [386,arm] bad-field-size: xt_rateest_match_info.est2: syz=8 kernel=4 [386,arm] bad-field-size: xt_bpf_info.filter: syz=8 kernel=4 [386,arm] -bad-field-number: xt_bpf_info_v1: syz=3 kernel=5 -bad-field-size: xt_bpf_info_v1.bytecode/mode: syz=528 kernel=2 -bad-field-offset: xt_bpf_info_v1.pinned/bpf_program_num_elem: syz=528 kernel=2 -bad-field-offset: xt_bpf_info_v1.fd: syz=1056 kernel=4 -bad-field-size: xt_bpf_info_v1.fd: syz=8 kernel=4 no-such-struct: xt_bpf_info_bytecode no-such-struct: xt_bpf_info_pinned no-such-struct: xt_bpf_info_fd diff --git a/sys/linux/netfilter_arp.txt.warn b/sys/linux/netfilter_arp.txt.warn index cc8ec81f..91cd6816 100644 --- a/sys/linux/netfilter_arp.txt.warn +++ b/sys/linux/netfilter_arp.txt.warn @@ -1,3 +1,14 @@ +bad-field-size: arpt_replace.hook_in/hook_entry: syz=4 kernel=12 +bad-field-offset: arpt_replace.hook_out/underflow: syz=48 kernel=56 +bad-field-size: arpt_replace.hook_out/underflow: syz=4 kernel=12 +bad-field-offset: arpt_replace.hook_forward/num_counters: syz=52 kernel=68 +bad-field-offset: arpt_replace.underflow_in/counters: syz=56 kernel=72 +bad-field-size: arpt_replace.underflow_in/counters: syz=4 kernel=8 [amd64,arm64] +bad-field-offset: arpt_replace.underflow_out/entries: syz=60 kernel=76 [386] +bad-field-offset: arpt_replace.underflow_out/entries: syz=60 kernel=80 [amd64,arm,arm64] +bad-field-size: arpt_replace.underflow_out/entries: syz=4 kernel=0 +bad-field-size: arpt_entry.matches/arp: syz=188 kernel=164 [386] +bad-field-size: arpt_entry.matches/arp: syz=192 kernel=164 [amd64,arm,arm64] no-such-struct: arpt_entry_matches no-such-struct: arpt_entry_underflow no-such-struct: arpt_entry_underflow_matches diff --git a/sys/linux/netfilter_bridge.txt.warn b/sys/linux/netfilter_bridge.txt.warn index 19028686..489a5bfe 100644 --- a/sys/linux/netfilter_bridge.txt.warn +++ b/sys/linux/netfilter_bridge.txt.warn @@ -1,5 +1,8 @@ no-such-struct: ebt_replace_t compiler: len target entries refer to an array with variable-size elements (do you mean bytesize?) +bad-field-offset: ebt_entry.watchers_offset: syz=98 kernel=100 +bad-field-offset: ebt_entry.target_offset: syz=102 kernel=104 +bad-field-offset: ebt_entry.next_offset: syz=106 kernel=108 no-such-struct: ebt_getinfo no-such-struct: ebt_get_entries bad-field-size: ebt_entry_match.name/u: syz=31 kernel=32 diff --git a/sys/linux/socket.txt.warn b/sys/linux/socket.txt.warn index 2da534fc..905da402 100644 --- a/sys/linux/socket.txt.warn +++ b/sys/linux/socket.txt.warn @@ -1,9 +1,5 @@ compiler: unsupported syscall: accept due to missing const __NR_accept [386] no-such-struct: sock_pair -bad-field-number: sockaddr: syz=19 kernel=2 -bad-field-size: sockaddr.in/sa_family: syz=16 kernel=2 -bad-field-offset: sockaddr.ax25/sa_data: syz=16 kernel=2 -bad-field-size: sockaddr.ax25/sa_data: syz=16 kernel=14 no-such-struct: sockaddr_storage no-such-struct: sockaddr_generic no-such-struct: sockaddr_storage_generic @@ -23,12 +19,6 @@ no-such-struct: vlan_args no-such-struct: vlan_args_u no-such-struct: devname_mask no-such-struct: ifs_ifsu -bad-field-size: ifconf.req/ifc_len: syz=16 kernel=4 [amd64,arm64] -bad-field-size: ifconf.req/ifc_len: syz=8 kernel=4 [386,arm] -bad-field-offset: ifconf.buf/ifc_ifcu: syz=16 kernel=8 [amd64,arm64] -bad-field-offset: ifconf.buf/ifc_ifcu: syz=8 kernel=4 [386,arm] -bad-field-size: ifconf.buf/ifc_ifcu: syz=16 kernel=8 [amd64,arm64] -bad-field-size: ifconf.buf/ifc_ifcu: syz=8 kernel=4 [386,arm] no-such-struct: ifconf_buf no-such-struct: ifconf_req no-such-struct: brctl_arg @@ -39,3 +29,5 @@ no-such-struct: ethtool_flow_union no-such-struct: ethtool_rx_ntuple no-such-struct: ethtool_rx_ntuple_flow_spec no-such-struct: ethtool_rx_ntuple_flow_spec_union +bad-field-size: ethtool_per_queue_op.queue_mask: syz=16384 kernel=512 +bad-field-size: ethtool_link_settings.reserved/transceiver: syz=32 kernel=1 diff --git a/sys/linux/socket_ax25.txt.warn b/sys/linux/socket_ax25.txt.warn index e80df59f..c69bfad4 100644 --- a/sys/linux/socket_ax25.txt.warn +++ b/sys/linux/socket_ax25.txt.warn @@ -1,4 +1,3 @@ -bad-field-number: ax25_address: syz=6 kernel=1 no-such-struct: ax25_address_remote no-such-struct: ax25_address_bcast no-such-struct: ax25_address_default diff --git a/sys/linux/socket_bluetooth.txt.warn b/sys/linux/socket_bluetooth.txt.warn index c9e74ce9..9b108963 100644 --- a/sys/linux/socket_bluetooth.txt.warn +++ b/sys/linux/socket_bluetooth.txt.warn @@ -1,3 +1,2 @@ no-such-struct: vhci_command_vendor_pkt -bad-field-number: bdaddr_t: syz=3 kernel=1 no-such-struct: bdaddr_fixed diff --git a/sys/linux/socket_caif.txt.warn b/sys/linux/socket_caif.txt.warn index 7d9981e7..c44159a5 100644 --- a/sys/linux/socket_caif.txt.warn +++ b/sys/linux/socket_caif.txt.warn @@ -1,6 +1,3 @@ -bad-field-number: sockaddr_caif: syz=5 kernel=2 -bad-field-size: sockaddr_caif.at/family: syz=4 kernel=2 -bad-field-size: sockaddr_caif.util/u: syz=18 kernel=20 no-such-struct: sockaddr_caif_at no-such-struct: sockaddr_caif_util no-such-struct: sockaddr_caif_dgm diff --git a/sys/linux/socket_inet_tcp.txt.warn b/sys/linux/socket_inet_tcp.txt.warn index 7fe3ce8e..3c8bc0d5 100644 --- a/sys/linux/socket_inet_tcp.txt.warn +++ b/sys/linux/socket_inet_tcp.txt.warn @@ -1,7 +1,4 @@ no-such-struct: sockaddr_storage_tcp -bad-field-number: tcp_repair_opt: syz=4 kernel=2 -bad-field-size: tcp_repair_opt.mss/opt_code: syz=8 kernel=4 -bad-field-offset: tcp_repair_opt.window/opt_val: syz=8 kernel=4 no-such-struct: tcp_repair_opt_mss no-such-struct: tcp_repair_opt_window no-such-struct: tcp_repair_opt_sack_perm diff --git a/sys/linux/socket_netlink.txt.warn b/sys/linux/socket_netlink.txt.warn index 4aa0e199..c5c2d567 100644 --- a/sys/linux/socket_netlink.txt.warn +++ b/sys/linux/socket_netlink.txt.warn @@ -1,8 +1,3 @@ -bad-field-number: sockaddr_nl: syz=3 kernel=4 -bad-field-size: sockaddr_nl.kern/nl_family: syz=12 kernel=2 -bad-field-offset: sockaddr_nl.proc/nl_pad: syz=12 kernel=2 -bad-field-offset: sockaddr_nl.unspec/nl_pid: syz=24 kernel=4 -bad-field-size: sockaddr_nl.unspec/nl_pid: syz=12 kernel=4 no-such-struct: sockaddr_nl_send no-such-struct: sockaddr_nl_t no-such-struct: msghdr_netlink_full diff --git a/sys/linux/socket_netlink_route_sched.txt.warn b/sys/linux/socket_netlink_route_sched.txt.warn index 1d5ee74e..d7e4bb86 100644 --- a/sys/linux/socket_netlink_route_sched.txt.warn +++ b/sys/linux/socket_netlink_route_sched.txt.warn @@ -13,6 +13,9 @@ no-such-netlink-policy: tclass_kind_options no-such-netlink-policy: tca_actions bad-netlink-attr: tcf_action_policy: missing attributes: [7] no-such-netlink-policy: tca_ife_meta_policy +bad-field-size: xt_entry_target.u_target_size/u: syz=2 kernel=32 +bad-field-offset: xt_entry_target.name/data: syz=2 kernel=32 +bad-field-size: xt_entry_target.name/data: syz=32 kernel=0 bad-netlink-attr: skbedit_policy: missing attributes: [8 9] bad-netlink-attr: tunnel_key_policy: missing attributes: [11 12 13] no-such-netlink-policy: action_gd_policy @@ -41,6 +44,11 @@ bad-field-offset: tc_nat.old_addr/capab: syz=20 kernel=4 bad-field-offset: tc_nat.new_addr/action: syz=24 kernel=8 bad-field-offset: tc_nat.mask/refcnt: syz=28 kernel=12 bad-field-offset: tc_nat.flags/bindcnt: syz=32 kernel=16 +bad-field-size: tc_pedit_sel.tc_gen/index: syz=20 kernel=4 +bad-field-offset: tc_pedit_sel.nkeys/capab: syz=20 kernel=4 +bad-field-size: tc_pedit_sel.nkeys/capab: syz=1 kernel=4 +bad-field-offset: tc_pedit_sel.flags/action: syz=21 kernel=8 +bad-field-size: tc_pedit_sel.flags/action: syz=1 kernel=4 no-such-struct: m_pedit_key_ex bad-field-number: tc_skbmod: syz=2 kernel=6 bad-field-size: tc_skbmod.tc_gen/index: syz=20 kernel=4 @@ -55,4 +63,7 @@ bad-field-size: tc_vlan.tc_gen/index: syz=20 kernel=4 bad-field-offset: tc_vlan.v_action/capab: syz=20 kernel=4 no-such-netlink-policy: tca_ematch_tree_list no-such-struct: tcf_ematch_hdr_t +bad-field-size: tcf_em_nbyte.off: syz=4 kernel=2 +bad-field-offset: tcf_em_nbyte.len: syz=4 kernel=2 +bad-field-offset: tcf_em_nbyte.layer: syz=5 kernel=3 no-such-struct: tc_estimator diff --git a/sys/linux/socket_rose.txt.warn b/sys/linux/socket_rose.txt.warn index d66e224d..45e62edd 100644 --- a/sys/linux/socket_rose.txt.warn +++ b/sys/linux/socket_rose.txt.warn @@ -1,3 +1,2 @@ -bad-field-number: rose_address: syz=2 kernel=1 no-such-struct: rose_address_remote no-such-struct: rose_address_dev diff --git a/sys/linux/socket_rxrpc.txt.warn b/sys/linux/socket_rxrpc.txt.warn index 2b419a42..efdcc76e 100644 --- a/sys/linux/socket_rxrpc.txt.warn +++ b/sys/linux/socket_rxrpc.txt.warn @@ -1,5 +1 @@ -bad-field-number: sockaddr_rxrpc: syz=2 kernel=5 -bad-field-size: sockaddr_rxrpc.in4/srx_family: syz=24 kernel=2 -bad-field-offset: sockaddr_rxrpc.in6/srx_service: syz=24 kernel=2 -bad-field-size: sockaddr_rxrpc.in6/srx_service: syz=36 kernel=2 no-such-struct: sockaddr_rxrpc_t diff --git a/sys/linux/socket_tipc.txt.warn b/sys/linux/socket_tipc.txt.warn index 1a705385..71e5799f 100644 --- a/sys/linux/socket_tipc.txt.warn +++ b/sys/linux/socket_tipc.txt.warn @@ -1,10 +1,4 @@ no-such-struct: tipc_pair -bad-field-number: sockaddr_tipc: syz=3 kernel=4 -bad-field-size: sockaddr_tipc.nameseq/family: syz=16 kernel=2 -bad-field-offset: sockaddr_tipc.name/addrtype: syz=16 kernel=2 -bad-field-size: sockaddr_tipc.name/addrtype: syz=16 kernel=1 -bad-field-offset: sockaddr_tipc.id/scope: syz=32 kernel=3 -bad-field-size: sockaddr_tipc.id/scope: syz=12 kernel=1 no-such-struct: sockaddr_tipc_t no-such-struct: msghdr_tipc no-such-struct: tipc_address_name diff --git a/sys/linux/socket_unix.txt.warn b/sys/linux/socket_unix.txt.warn index 3f98efe5..f72cebf2 100644 --- a/sys/linux/socket_unix.txt.warn +++ b/sys/linux/socket_unix.txt.warn @@ -1,7 +1,4 @@ no-such-struct: unix_pair -bad-field-size: sockaddr_un.file/sun_family: syz=110 kernel=2 -bad-field-offset: sockaddr_un.abs/sun_path: syz=110 kernel=2 -bad-field-size: sockaddr_un.abs/sun_path: syz=8 kernel=108 no-such-struct: sockaddr_un_file no-such-struct: sockaddr_un_abstract no-such-struct: msghdr_un diff --git a/sys/linux/socket_x25.txt.warn b/sys/linux/socket_x25.txt.warn index a8acbc18..c49c46a5 100644 --- a/sys/linux/socket_x25.txt.warn +++ b/sys/linux/socket_x25.txt.warn @@ -1,2 +1 @@ -bad-field-number: x25_address: syz=2 kernel=1 no-such-struct: x25_address_remote diff --git a/sys/linux/vnet.txt.warn b/sys/linux/vnet.txt.warn index b8c946d2..453c7be8 100644 --- a/sys/linux/vnet.txt.warn +++ b/sys/linux/vnet.txt.warn @@ -2,7 +2,6 @@ no-such-struct: vnet_fragmentation no-such-struct: tcp_resources no-such-struct: mac_addr_t no-such-struct: mac_addr_link_local -bad-field-number: mac_addr: syz=7 kernel=1 no-such-struct: vlan_tag_ad no-such-struct: vlan_tag_q no-such-struct: eth2_packet_t @@ -39,6 +38,8 @@ no-such-struct: tcp_sack_perm_option no-such-struct: tcp_timestamp_option no-such-struct: tcp_md5sig_option no-such-struct: tcp_exp_smc_option +bad-bitfield: guehdr.hlen/: size/offset: syz=5/0 kernel=0/0 +bad-field-size: guehdr.hlen/: syz=1 kernel=4 no-such-struct: gre_packet_erspan no-such-struct: erspan_md1 no-such-struct: erspan_md1_msg diff --git a/sys/linux/vusb.txt.warn b/sys/linux/vusb.txt.warn index a30c68a5..d8dfed46 100644 --- a/sys/linux/vusb.txt.warn +++ b/sys/linux/vusb.txt.warn @@ -13,6 +13,13 @@ compiler: len target caps refer to an array with variable-size elements (do you no-such-struct: usb_wireless_cap_descriptor bad-field-number: usb_ext_cap_descriptor: syz=7 kernel=4 bad-bitfield: usb_ext_cap_descriptor.bmAttributes1/bmAttributes: size/offset: syz=8/0 kernel=0/0 +bad-bitfield: usb_ssp_cap_descriptor.bmAttributesSublinkSpeeds/bmAttributes: size/offset: syz=5/0 kernel=0/0 +bad-bitfield: usb_ssp_cap_descriptor.bmAttributesSpeedIDs/wFunctionalitySupport: size/offset: syz=27/5 kernel=0/0 +bad-field-offset: usb_ssp_cap_descriptor.bmAttributesSpeedIDs/wFunctionalitySupport: syz=4 kernel=8 +bad-field-size: usb_ssp_cap_descriptor.bmAttributesSpeedIDs/wFunctionalitySupport: syz=4 kernel=2 +bad-field-offset: usb_ssp_cap_descriptor.wFunctionalitySupport/wReserved: syz=8 kernel=10 +bad-field-offset: usb_ssp_cap_descriptor.wReserved/bmSublinkSpeedAttr: syz=10 kernel=12 +bad-field-size: usb_ssp_cap_descriptor.wReserved/bmSublinkSpeedAttr: syz=2 kernel=4 no-such-struct: usb_hub_descriptor_hs no-such-struct: usb_hub_descriptor_ss no-such-struct: usb_endpoint_descriptor_hid_in diff --git a/sys/linux/xattr.txt b/sys/linux/xattr.txt index df1c05f8..1a014e9e 100644 --- a/sys/linux/xattr.txt +++ b/sys/linux/xattr.txt @@ -126,7 +126,7 @@ signature_v2_hdr { keyid int32be sig_size bytesize[sig, int16be] sig array[int8] -} +} [packed] evm_xattr_type = EVM_IMA_XATTR_DIGSIG, EVM_XATTR_PORTABLE_DIGSIG @@ -162,9 +162,9 @@ setxattr$trusted_overlay_nlink(path ptr[in, filename], name ptr[in, string["trus lsetxattr$trusted_overlay_nlink(path ptr[in, filename], name ptr[in, string["trusted.overlay.nlink"]], val ptr[in, xattr_overlay_nlink], size len[val], flags flags[setxattr_flags]) fsetxattr$trusted_overlay_nlink(fd fd, name ptr[in, string["trusted.overlay.nlink"]], val ptr[in, xattr_overlay_nlink], size len[val], flags flags[setxattr_flags]) -setxattr$trusted_overlay_upper(path ptr[in, filename], name ptr[in, string["trusted.overlay.upper"]], val ptr[in, ovl_fh], size len[val], flags flags[setxattr_flags]) -lsetxattr$trusted_overlay_upper(path ptr[in, filename], name ptr[in, string["trusted.overlay.upper"]], val ptr[in, ovl_fh], size len[val], flags flags[setxattr_flags]) -fsetxattr$trusted_overlay_upper(fd fd, name ptr[in, string["trusted.overlay.upper"]], val ptr[in, ovl_fh], size len[val], flags flags[setxattr_flags]) +setxattr$trusted_overlay_upper(path ptr[in, filename], name ptr[in, string["trusted.overlay.upper"]], val ptr[in, ovl_fb], size len[val], flags flags[setxattr_flags]) +lsetxattr$trusted_overlay_upper(path ptr[in, filename], name ptr[in, string["trusted.overlay.upper"]], val ptr[in, ovl_fb], size len[val], flags flags[setxattr_flags]) +fsetxattr$trusted_overlay_upper(fd fd, name ptr[in, string["trusted.overlay.upper"]], val ptr[in, ovl_fb], size len[val], flags flags[setxattr_flags]) xattr_overlay_nlink { prefix stringnoz[xattr_overlay_nlink_prefix] @@ -173,11 +173,12 @@ xattr_overlay_nlink { xattr_overlay_nlink_prefix = "U+", "U-", "L+", "L-" -ovl_fh { +# TODO: do these attrs accept ovl_fb or ovl_fh?.. +ovl_fb { version const[0, int8] magic const[OVL_FH_MAGIC, int8] len bytesize[parent, int8] - flags flags[ovl_fh_flags, int8] + flags flags[ovl_fb_flags, int8] type int8 uuid uuid_t fid array[int8] @@ -185,4 +186,4 @@ ovl_fh { type uuid_t array[int8, UUID_SIZE] -ovl_fh_flags = OVL_FH_FLAG_BIG_ENDIAN, OVL_FH_FLAG_ANY_ENDIAN, OVL_FH_FLAG_PATH_UPPER +ovl_fb_flags = OVL_FH_FLAG_BIG_ENDIAN, OVL_FH_FLAG_ANY_ENDIAN, OVL_FH_FLAG_PATH_UPPER diff --git a/tools/syz-check/check.go b/tools/syz-check/check.go index fbb6432f..513a0d74 100644 --- a/tools/syz-check/check.go +++ b/tools/syz-check/check.go @@ -92,6 +92,9 @@ func main() { func check(OS, arch, obj string, dwarf, netlink bool) ([]Warn, error) { var warnings []Warn + if obj == "" { + return nil, fmt.Errorf("no object file in -obj-%v flag", arch) + } structDescs, locs, warnings1, err := parseDescriptions(OS, arch) if err != nil { return nil, err @@ -206,9 +209,6 @@ func checkImpl(structs map[string]*dwarf.StructType, structDescs []*prog.KeyedSt checked := make(map[string]bool) for _, str := range structDescs { typ := str.Desc - if typ.Varlen() { - continue - } if checked[typ.Name()] { continue } @@ -234,14 +234,17 @@ func checkStruct(typ *prog.StructDesc, astStruct *ast.Struct, str *dwarf.StructT } name := typ.TemplateName() if str == nil { - warn(astStruct.Pos, WarnNoSuchStruct, "%v", name) + // Varlen structs are frequently not described in kernel (not possible in C). + if !typ.Varlen() { + warn(astStruct.Pos, WarnNoSuchStruct, "%v", name) + } return warnings, nil } - if typ.Size() != uint64(str.ByteSize) { + if !typ.Varlen() && typ.Size() != uint64(str.ByteSize) { warn(astStruct.Pos, WarnBadStructSize, "%v: syz=%v kernel=%v", name, typ.Size(), str.ByteSize) } // TODO: handle unions, currently we should report some false errors. - if str.Kind == "union" { + if str.Kind == "union" || astStruct.IsUnion { return warnings, nil } // TODO: we could also check enums (elements match corresponding flags in syzkaller). @@ -261,6 +264,10 @@ func checkStruct(typ *prog.StructDesc, astStruct *ast.Struct, str *dwarf.StructT ai := 0 offset := uint64(0) for _, field := range typ.Fields { + if field.Varlen() { + ai = len(str.Field) + break + } if prog.IsPad(field) { offset += field.Size() continue