From 9d56e7ddd67e5ec46588c6434db739d94a7d2aae Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Wed, 13 Oct 2021 08:07:43 +0200 Subject: executor: don't mount some cgroup controllers during setup Leave some controllers unbound so that the fuzzer can mount them during fuzzing. This is suboptimal because all controllers are global (so different test processes will collide, state accumulate, etc), but this still should give at least some new coverage. --- executor/common_linux.h | 6 +++--- pkg/csource/generated.go | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/executor/common_linux.h b/executor/common_linux.h index 43fb6c2ce..b4303de1e 100644 --- a/executor/common_linux.h +++ b/executor/common_linux.h @@ -3493,9 +3493,9 @@ static void setup_cgroups() // Note: we need to enable controllers one-by-one for both cgroup and cgroup2. // If we enable all at the same time and one of them fails (b/c of older kernel // or not enabled configs), then all will fail. - const char* unified_controllers[] = {"+cpu", "+memory", "+io", "+pids", "+rdma"}; - const char* net_controllers[] = {"net", "net_cls", "net_prio", "devices", "blkio", "freezer"}; - const char* cpu_controllers[] = {"cpuset", "cpuacct", "perf_event", "hugetlb", "rlimit"}; + const char* unified_controllers[] = {"+cpu", "+memory", "+io", "+pids"}; + const char* net_controllers[] = {"net", "net_prio", "devices", "blkio", "freezer"}; + const char* cpu_controllers[] = {"cpuset", "cpuacct", "hugetlb", "rlimit"}; if (mkdir("/syzcgroup", 0777)) { debug("mkdir(/syzcgroup) failed: %d\n", errno); } diff --git a/pkg/csource/generated.go b/pkg/csource/generated.go index 9aad9fefa..44b6a1297 100644 --- a/pkg/csource/generated.go +++ b/pkg/csource/generated.go @@ -8129,9 +8129,9 @@ static void mount_cgroups(const char* dir, const char** controllers, int count) static void setup_cgroups() { - const char* unified_controllers[] = {"+cpu", "+memory", "+io", "+pids", "+rdma"}; - const char* net_controllers[] = {"net", "net_cls", "net_prio", "devices", "blkio", "freezer"}; - const char* cpu_controllers[] = {"cpuset", "cpuacct", "perf_event", "hugetlb", "rlimit"}; + const char* unified_controllers[] = {"+cpu", "+memory", "+io", "+pids"}; + const char* net_controllers[] = {"net", "net_prio", "devices", "blkio", "freezer"}; + const char* cpu_controllers[] = {"cpuset", "cpuacct", "hugetlb", "rlimit"}; if (mkdir("/syzcgroup", 0777)) { debug("mkdir(/syzcgroup) failed: %d\n", errno); } -- cgit mrf-deployment