diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-11-10 03:30:10 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-11-10 03:30:10 +0900 |
| commit | 4d08ed505bcc90760833d28b1a0e40850fcdcd63 (patch) | |
| tree | 360b06a80878d2d4d97b266a74ea996fb41698ca | |
| parent | 818c28cf1d2b4d486adc2ddd671e472f6c97ce4c (diff) | |
cmd/earlyinit: mount cgroup
This does not require additional state, so mount it early.
Signed-off-by: Ophestra <cat@gensokyo.uk>
| -rw-r--r-- | cmd/earlyinit/main.go | 9 |
1 files changed, 8 insertions, 1 deletions
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) |
