From 4d08ed505bcc90760833d28b1a0e40850fcdcd63 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Tue, 10 Nov 2026 03:30:10 +0900 Subject: cmd/earlyinit: mount cgroup This does not require additional state, so mount it early. Signed-off-by: Ophestra --- cmd/earlyinit/main.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'cmd') diff --git a/cmd/earlyinit/main.go b/cmd/earlyinit/main.go index 4df46cfc..2f1eebef 100644 --- a/cmd/earlyinit/main.go +++ b/cmd/earlyinit/main.go @@ -239,9 +239,16 @@ func main() { "sysfs", "/sys", "sysfs", - 0, + MS_NOSUID|MS_NODEV|MS_NOEXEC, "", )) + mustSyscall("mount cgroup", Mount( + "cgroup", + "/sys/fs/cgroup", + "cgroup2", + MS_NOSUID|MS_NODEV|MS_NOEXEC, + "nsdelegate", + )) conn := must1(uevent.Dial(-128 * 1024 * 1024)) events := make(chan *uevent.Message, 1<<10) -- cgit v1.3.1