From bf5e585c5e1b12fe80ee486fdd48eeb71a13fa21 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Tue, 27 Mar 2018 11:39:58 +0200 Subject: executor: rework cgroups support Turns out creating a cgroup per test is too expensive. Moreover, it leads to hanged tasks as cgroup destruction is asynchronous and overloads kernel work queues. Create only a single cgroup per proc, but restrict descriptions to mess with that single group, instead test processes create own nested cgroups for messing. --- sys/linux/arm.go | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'sys/linux/arm.go') diff --git a/sys/linux/arm.go b/sys/linux/arm.go index 084d9db0f..273eff0e5 100644 --- a/sys/linux/arm.go +++ b/sys/linux/arm.go @@ -18218,7 +18218,12 @@ var syscalls_arm = []*Syscall{ {NR: 323, Name: "mkdirat$cgroup", CallName: "mkdirat", Args: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_cgroup", FldName: "fd", TypeSize: 4}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "path", TypeSize: 4}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "string", TypeSize: 5}, Kind: 2, SubKind: "cgroup_names", Values: []string{"syz0\x00", "syz1\x00"}}}, - &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "open_mode", FldName: "mode", TypeSize: 4}}, Vals: []uint64{256, 128, 64, 32, 16, 8, 4, 2, 1}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "mode", TypeSize: 4}}, Val: 511}, + }}, + {NR: 323, Name: "mkdirat$cgroup_root", CallName: "mkdirat", Args: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "fd", TypeSize: 4}}, Val: 18446744073709551516}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "path", TypeSize: 4}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "string", IsVarlen: true}, Kind: 2, SubKind: "cgroup_dirs", Values: []string{"./cgroup/syz0\x00", "./cgroup/syz1\x00", "./cgroup.cpu/syz0\x00", "./cgroup.cpu/syz1\x00", "./cgroup.net/syz0\x00", "./cgroup.net/syz1\x00"}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "mode", TypeSize: 4}}, Val: 511}, }}, {NR: 14, Name: "mknod", CallName: "mknod", Args: []Type{ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "file", TypeSize: 4}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename", IsVarlen: true}, Kind: 3}}, @@ -18469,7 +18474,7 @@ var syscalls_arm = []*Syscall{ }, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "ret", TypeSize: 4, ArgDir: 1}}}, {NR: 322, Name: "openat$cgroup_root", CallName: "openat", Args: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "fd", TypeSize: 4}}, Val: 18446744073709551516}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "file", TypeSize: 4}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "string", IsVarlen: true}, Kind: 2, SubKind: "cgroup_dirs", Values: []string{"./cgroup\x00", "./cgroup.cpu\x00", "./cgroup.net\x00"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "file", TypeSize: 4}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "string", IsVarlen: true}, Kind: 2, SubKind: "cgroup_dirs", Values: []string{"./cgroup/syz0\x00", "./cgroup/syz1\x00", "./cgroup.cpu/syz0\x00", "./cgroup.cpu/syz1\x00", "./cgroup.net/syz0\x00", "./cgroup.net/syz1\x00"}}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "flags", TypeSize: 4}}, Val: 2097154}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "mode", TypeSize: 4}}}, }, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_cgroup", FldName: "ret", TypeSize: 4, ArgDir: 1}}}, @@ -26562,4 +26567,4 @@ var consts_arm = []ConstValue{ {Name: "bpf_insn_load_imm_dw", Value: 24}, } -const revision_arm = "0a97c03cf5907e48f42a9a826f88b4e39e4afaa6" +const revision_arm = "42e4743c2ba28b83149861a991d92d8a57bde754" -- cgit mrf-deployment