From be348f6db38c583b804772f246e68146e52d20f4 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Mon, 22 Jul 2019 11:20:54 +0200 Subject: [PATCH] sys/linux: improve sched_attr description Today we have means to properly describe parent size. --- executor/defs.h | 10 +++++----- sys/linux/gen/386.go | 6 +++--- sys/linux/gen/amd64.go | 6 +++--- sys/linux/gen/arm.go | 6 +++--- sys/linux/gen/arm64.go | 6 +++--- sys/linux/gen/ppc64le.go | 6 +++--- sys/linux/sys.txt | 3 +-- 7 files changed, 21 insertions(+), 22 deletions(-) diff --git a/executor/defs.h b/executor/defs.h index 42683a00850a..0cab7fb1bc98 100644 --- a/executor/defs.h +++ b/executor/defs.h @@ -70,7 +70,7 @@ #if GOARCH_386 #define GOARCH "386" -#define SYZ_REVISION "ccc2cdeb1bb485261e99acfaa2cdf88c89136043" +#define SYZ_REVISION "e434a9bc85298e5fffd4676e123f232b437c5ef2" #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 "3ad0caf28b47f3c27a8f69b938b8f93073f6611c" +#define SYZ_REVISION "8e949a8b3ca08d1ffa44cee2a190d729a6f14635" #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 "0aea57e00bdd385a6598b158d35ac8f03cb3915b" +#define SYZ_REVISION "a3c92c0516c0d1b3539007b2d692027673758bca" #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 "8cd19665e25b860288db2dbdc6ecd8638c78592b" +#define SYZ_REVISION "bd7daa592ae59c3b4ecadeb3555d51e510f4acfa" #define SYZ_EXECUTOR_USES_FORK_SERVER 1 #define SYZ_EXECUTOR_USES_SHMEM 1 #define SYZ_PAGE_SIZE 4096 @@ -110,7 +110,7 @@ #if GOARCH_ppc64le #define GOARCH "ppc64le" -#define SYZ_REVISION "5e7246d3cadcc34a6acaa0542495c1056a555bef" +#define SYZ_REVISION "5a5d071d07839c8760ac38ea12c8b84421d4e509" #define SYZ_EXECUTOR_USES_FORK_SERVER 1 #define SYZ_EXECUTOR_USES_SHMEM 1 #define SYZ_PAGE_SIZE 4096 diff --git a/sys/linux/gen/386.go b/sys/linux/gen/386.go index e0a2de96e782..3362893097ad 100644 --- a/sys/linux/gen/386.go +++ b/sys/linux/gen/386.go @@ -20686,7 +20686,7 @@ var structDescs_386 = []*KeyedStruct{ &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "ctx", IsVarlen: true}}, }, AlignAttr: 8}}, {Key: StructKey{Name: "sched_attr"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "sched_attr", TypeSize: 48}, Fields: []Type{ - &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "sched_attr_size", FldName: "size", TypeSize: 4}}, Vals: []uint64{48}, BitMask: true}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "size", TypeSize: 4}}, BitSize: 8, Path: []string{"parent"}}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "sched_policy", FldName: "policy", TypeSize: 4}}, Vals: []uint64{0, 3, 5, 1, 2, 6}}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "sched_attr_flags2", FldName: "flags", TypeSize: 8}}, Vals: []uint64{0, 1}, BitMask: true}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "nice", TypeSize: 4}}}, @@ -20696,7 +20696,7 @@ var structDescs_386 = []*KeyedStruct{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "period", TypeSize: 8}}}, }}}, {Key: StructKey{Name: "sched_attr", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "sched_attr", TypeSize: 48, ArgDir: 1}, Fields: []Type{ - &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "sched_attr_size", FldName: "size", TypeSize: 4, ArgDir: 1}}, Vals: []uint64{48}, BitMask: true}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "size", TypeSize: 4, ArgDir: 1}}, BitSize: 8, Path: []string{"parent"}}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "sched_policy", FldName: "policy", TypeSize: 4, ArgDir: 1}}, Vals: []uint64{0, 3, 5, 1, 2, 6}}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "sched_attr_flags2", FldName: "flags", TypeSize: 8, ArgDir: 1}}, Vals: []uint64{0, 1}, BitMask: true}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "nice", TypeSize: 4, ArgDir: 1}}}, @@ -51718,4 +51718,4 @@ var consts_386 = []ConstValue{ {Name: "bpf_insn_load_imm_dw", Value: 24}, } -const revision_386 = "ccc2cdeb1bb485261e99acfaa2cdf88c89136043" +const revision_386 = "e434a9bc85298e5fffd4676e123f232b437c5ef2" diff --git a/sys/linux/gen/amd64.go b/sys/linux/gen/amd64.go index 602bdf3e82d1..29582e203fc4 100644 --- a/sys/linux/gen/amd64.go +++ b/sys/linux/gen/amd64.go @@ -20978,7 +20978,7 @@ var structDescs_amd64 = []*KeyedStruct{ &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "ctx", IsVarlen: true}}, }, AlignAttr: 8}}, {Key: StructKey{Name: "sched_attr"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "sched_attr", TypeSize: 48}, Fields: []Type{ - &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "sched_attr_size", FldName: "size", TypeSize: 4}}, Vals: []uint64{48}, BitMask: true}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "size", TypeSize: 4}}, BitSize: 8, Path: []string{"parent"}}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "sched_policy", FldName: "policy", TypeSize: 4}}, Vals: []uint64{0, 3, 5, 1, 2, 6}}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "sched_attr_flags2", FldName: "flags", TypeSize: 8}}, Vals: []uint64{0, 1}, BitMask: true}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "nice", TypeSize: 4}}}, @@ -20988,7 +20988,7 @@ var structDescs_amd64 = []*KeyedStruct{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "period", TypeSize: 8}}}, }}}, {Key: StructKey{Name: "sched_attr", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "sched_attr", TypeSize: 48, ArgDir: 1}, Fields: []Type{ - &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "sched_attr_size", FldName: "size", TypeSize: 4, ArgDir: 1}}, Vals: []uint64{48}, BitMask: true}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "size", TypeSize: 4, ArgDir: 1}}, BitSize: 8, Path: []string{"parent"}}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "sched_policy", FldName: "policy", TypeSize: 4, ArgDir: 1}}, Vals: []uint64{0, 3, 5, 1, 2, 6}}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "sched_attr_flags2", FldName: "flags", TypeSize: 8, ArgDir: 1}}, Vals: []uint64{0, 1}, BitMask: true}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "nice", TypeSize: 4, ArgDir: 1}}}, @@ -52255,4 +52255,4 @@ var consts_amd64 = []ConstValue{ {Name: "bpf_insn_load_imm_dw", Value: 24}, } -const revision_amd64 = "3ad0caf28b47f3c27a8f69b938b8f93073f6611c" +const revision_amd64 = "8e949a8b3ca08d1ffa44cee2a190d729a6f14635" diff --git a/sys/linux/gen/arm.go b/sys/linux/gen/arm.go index fd19f6a625aa..c6e83211e756 100644 --- a/sys/linux/gen/arm.go +++ b/sys/linux/gen/arm.go @@ -20503,7 +20503,7 @@ var structDescs_arm = []*KeyedStruct{ &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "ctx", IsVarlen: true}}, }, AlignAttr: 8}}, {Key: StructKey{Name: "sched_attr"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "sched_attr", TypeSize: 48}, Fields: []Type{ - &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "sched_attr_size", FldName: "size", TypeSize: 4}}, Vals: []uint64{48}, BitMask: true}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "size", TypeSize: 4}}, BitSize: 8, Path: []string{"parent"}}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "sched_policy", FldName: "policy", TypeSize: 4}}, Vals: []uint64{0, 3, 5, 1, 2, 6}}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "sched_attr_flags2", FldName: "flags", TypeSize: 8}}, Vals: []uint64{0, 1}, BitMask: true}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "nice", TypeSize: 4}}}, @@ -20513,7 +20513,7 @@ var structDescs_arm = []*KeyedStruct{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "period", TypeSize: 8}}}, }}}, {Key: StructKey{Name: "sched_attr", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "sched_attr", TypeSize: 48, ArgDir: 1}, Fields: []Type{ - &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "sched_attr_size", FldName: "size", TypeSize: 4, ArgDir: 1}}, Vals: []uint64{48}, BitMask: true}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "size", TypeSize: 4, ArgDir: 1}}, BitSize: 8, Path: []string{"parent"}}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "sched_policy", FldName: "policy", TypeSize: 4, ArgDir: 1}}, Vals: []uint64{0, 3, 5, 1, 2, 6}}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "sched_attr_flags2", FldName: "flags", TypeSize: 8, ArgDir: 1}}, Vals: []uint64{0, 1}, BitMask: true}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "nice", TypeSize: 4, ArgDir: 1}}}, @@ -51295,4 +51295,4 @@ var consts_arm = []ConstValue{ {Name: "bpf_insn_load_imm_dw", Value: 24}, } -const revision_arm = "0aea57e00bdd385a6598b158d35ac8f03cb3915b" +const revision_arm = "a3c92c0516c0d1b3539007b2d692027673758bca" diff --git a/sys/linux/gen/arm64.go b/sys/linux/gen/arm64.go index 80b9280523a4..21c889c43efe 100644 --- a/sys/linux/gen/arm64.go +++ b/sys/linux/gen/arm64.go @@ -20795,7 +20795,7 @@ var structDescs_arm64 = []*KeyedStruct{ &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "ctx", IsVarlen: true}}, }, AlignAttr: 8}}, {Key: StructKey{Name: "sched_attr"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "sched_attr", TypeSize: 48}, Fields: []Type{ - &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "sched_attr_size", FldName: "size", TypeSize: 4}}, Vals: []uint64{48}, BitMask: true}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "size", TypeSize: 4}}, BitSize: 8, Path: []string{"parent"}}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "sched_policy", FldName: "policy", TypeSize: 4}}, Vals: []uint64{0, 3, 5, 1, 2, 6}}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "sched_attr_flags2", FldName: "flags", TypeSize: 8}}, Vals: []uint64{0, 1}, BitMask: true}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "nice", TypeSize: 4}}}, @@ -20805,7 +20805,7 @@ var structDescs_arm64 = []*KeyedStruct{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "period", TypeSize: 8}}}, }}}, {Key: StructKey{Name: "sched_attr", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "sched_attr", TypeSize: 48, ArgDir: 1}, Fields: []Type{ - &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "sched_attr_size", FldName: "size", TypeSize: 4, ArgDir: 1}}, Vals: []uint64{48}, BitMask: true}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "size", TypeSize: 4, ArgDir: 1}}, BitSize: 8, Path: []string{"parent"}}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "sched_policy", FldName: "policy", TypeSize: 4, ArgDir: 1}}, Vals: []uint64{0, 3, 5, 1, 2, 6}}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "sched_attr_flags2", FldName: "flags", TypeSize: 8, ArgDir: 1}}, Vals: []uint64{0, 1}, BitMask: true}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "nice", TypeSize: 4, ArgDir: 1}}}, @@ -51607,4 +51607,4 @@ var consts_arm64 = []ConstValue{ {Name: "bpf_insn_load_imm_dw", Value: 24}, } -const revision_arm64 = "8cd19665e25b860288db2dbdc6ecd8638c78592b" +const revision_arm64 = "bd7daa592ae59c3b4ecadeb3555d51e510f4acfa" diff --git a/sys/linux/gen/ppc64le.go b/sys/linux/gen/ppc64le.go index ad4a286f4234..793f10bed698 100644 --- a/sys/linux/gen/ppc64le.go +++ b/sys/linux/gen/ppc64le.go @@ -20747,7 +20747,7 @@ var structDescs_ppc64le = []*KeyedStruct{ &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "ctx", IsVarlen: true}}, }, AlignAttr: 8}}, {Key: StructKey{Name: "sched_attr"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "sched_attr", TypeSize: 48}, Fields: []Type{ - &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "sched_attr_size", FldName: "size", TypeSize: 4}}, Vals: []uint64{48}, BitMask: true}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "size", TypeSize: 4}}, BitSize: 8, Path: []string{"parent"}}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "sched_policy", FldName: "policy", TypeSize: 4}}, Vals: []uint64{0, 3, 5, 1, 2, 6}}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "sched_attr_flags2", FldName: "flags", TypeSize: 8}}, Vals: []uint64{0, 1}, BitMask: true}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "nice", TypeSize: 4}}}, @@ -20757,7 +20757,7 @@ var structDescs_ppc64le = []*KeyedStruct{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "period", TypeSize: 8}}}, }}}, {Key: StructKey{Name: "sched_attr", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "sched_attr", TypeSize: 48, ArgDir: 1}, Fields: []Type{ - &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "sched_attr_size", FldName: "size", TypeSize: 4, ArgDir: 1}}, Vals: []uint64{48}, BitMask: true}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "size", TypeSize: 4, ArgDir: 1}}, BitSize: 8, Path: []string{"parent"}}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "sched_policy", FldName: "policy", TypeSize: 4, ArgDir: 1}}, Vals: []uint64{0, 3, 5, 1, 2, 6}}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "sched_attr_flags2", FldName: "flags", TypeSize: 8, ArgDir: 1}}, Vals: []uint64{0, 1}, BitMask: true}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "nice", TypeSize: 4, ArgDir: 1}}}, @@ -51572,4 +51572,4 @@ var consts_ppc64le = []ConstValue{ {Name: "bpf_insn_load_imm_dw", Value: 24}, } -const revision_ppc64le = "5e7246d3cadcc34a6acaa0542495c1056a555bef" +const revision_ppc64le = "5a5d071d07839c8760ac38ea12c8b84421d4e509" diff --git a/sys/linux/sys.txt b/sys/linux/sys.txt index cb053d256551..b0f28517d5ce 100644 --- a/sys/linux/sys.txt +++ b/sys/linux/sys.txt @@ -804,7 +804,7 @@ user_desc_bases = 0, 4096, 1048576, 536870912, 536872960, 536875008, -1 user_desc_limits = 0, 1024, 4096, 8192, 16384, -1 sched_attr { - size flags[sched_attr_size, int32] + size bytesize[parent, int32] policy flags[sched_policy, int32] flags flags[sched_attr_flags2, int64] nice int32 @@ -905,7 +905,6 @@ priority_which = PRIO_PROCESS, PRIO_PGRP, PRIO_USER sched_policy = SCHED_NORMAL, SCHED_BATCH, SCHED_IDLE, SCHED_FIFO, SCHED_RR, SCHED_DEADLINE sched_attr_flags = 0 sched_attr_flags2 = 0, SCHED_FLAG_RESET_ON_FORK -sched_attr_size = 48 mempolicy_flags = 0, MPOL_F_MEMS_ALLOWED, MPOL_F_ADDR, MPOL_F_NODE ptrace_req = PTRACE_LISTEN, PTRACE_KILL, PTRACE_INTERRUPT, PTRACE_ATTACH, PTRACE_DETACH ptrace_req_peek = PTRACE_PEEKTEXT, PTRACE_PEEKDATA