Skip to content

Commit

Permalink
sys/linux: improve sched_attr description
Browse files Browse the repository at this point in the history
Today we have means to properly describe parent size.
  • Loading branch information
dvyukov committed Jul 22, 2019
1 parent 5181b54 commit be348f6
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 22 deletions.
10 changes: 5 additions & 5 deletions executor/defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions sys/linux/gen/386.go
Original file line number Diff line number Diff line change
Expand Up @@ -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}}},
Expand All @@ -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}}},
Expand Down Expand Up @@ -51718,4 +51718,4 @@ var consts_386 = []ConstValue{
{Name: "bpf_insn_load_imm_dw", Value: 24},
}

const revision_386 = "ccc2cdeb1bb485261e99acfaa2cdf88c89136043"
const revision_386 = "e434a9bc85298e5fffd4676e123f232b437c5ef2"
6 changes: 3 additions & 3 deletions sys/linux/gen/amd64.go
Original file line number Diff line number Diff line change
Expand Up @@ -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}}},
Expand All @@ -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}}},
Expand Down Expand Up @@ -52255,4 +52255,4 @@ var consts_amd64 = []ConstValue{
{Name: "bpf_insn_load_imm_dw", Value: 24},
}

const revision_amd64 = "3ad0caf28b47f3c27a8f69b938b8f93073f6611c"
const revision_amd64 = "8e949a8b3ca08d1ffa44cee2a190d729a6f14635"
6 changes: 3 additions & 3 deletions sys/linux/gen/arm.go
Original file line number Diff line number Diff line change
Expand Up @@ -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}}},
Expand All @@ -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}}},
Expand Down Expand Up @@ -51295,4 +51295,4 @@ var consts_arm = []ConstValue{
{Name: "bpf_insn_load_imm_dw", Value: 24},
}

const revision_arm = "0aea57e00bdd385a6598b158d35ac8f03cb3915b"
const revision_arm = "a3c92c0516c0d1b3539007b2d692027673758bca"
6 changes: 3 additions & 3 deletions sys/linux/gen/arm64.go
Original file line number Diff line number Diff line change
Expand Up @@ -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}}},
Expand All @@ -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}}},
Expand Down Expand Up @@ -51607,4 +51607,4 @@ var consts_arm64 = []ConstValue{
{Name: "bpf_insn_load_imm_dw", Value: 24},
}

const revision_arm64 = "8cd19665e25b860288db2dbdc6ecd8638c78592b"
const revision_arm64 = "bd7daa592ae59c3b4ecadeb3555d51e510f4acfa"
6 changes: 3 additions & 3 deletions sys/linux/gen/ppc64le.go
Original file line number Diff line number Diff line change
Expand Up @@ -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}}},
Expand All @@ -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}}},
Expand Down Expand Up @@ -51572,4 +51572,4 @@ var consts_ppc64le = []ConstValue{
{Name: "bpf_insn_load_imm_dw", Value: 24},
}

const revision_ppc64le = "5e7246d3cadcc34a6acaa0542495c1056a555bef"
const revision_ppc64le = "5a5d071d07839c8760ac38ea12c8b84421d4e509"
3 changes: 1 addition & 2 deletions sys/linux/sys.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit be348f6

Please sign in to comment.