diff options
Diffstat (limited to 'cmd/earlyinit')
| -rw-r--r-- | cmd/earlyinit/main.go | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/cmd/earlyinit/main.go b/cmd/earlyinit/main.go index 02841620..4df46cfc 100644 --- a/cmd/earlyinit/main.go +++ b/cmd/earlyinit/main.go @@ -107,6 +107,8 @@ const ( flagKmsg = "kmsg" // flagNoRemount arranges for / to remain writable. flagNoRemount = "no_remount" + // flagBindableMisc skips making /misc/ unbindable. + flagBindableMisc = "bindable_misc" // flagMountTmp arranges for /tmp/ to be made available. flagMountTmp = "mount_tmp" // flag9P arranges for a host directory to be mounted at /host/. @@ -145,7 +147,6 @@ func main() { if !slices.Contains(flags, flagTrivial) { flag |= report.DIgnoreTrivial } - log.Printf("reporting flags %x", flag) r.SetFlags(flag) } @@ -299,13 +300,15 @@ func main() { MS_NOATIME|MS_NODEV|MS_NOEXEC|MS_NOSUID, "size=16M,mode=0555,noswap", )) - mustSyscall("set misc MS_UNBINDABLE", Mount( - "", - "/misc", - "", - MS_UNBINDABLE, - "", - )) + if !slices.Contains(flags, flagBindableMisc) { + mustSyscall("set misc MS_UNBINDABLE", Mount( + "", + "/misc", + "", + MS_UNBINDABLE, + "", + )) + } // for testsuite if slices.Contains(flags, flagEarlyHsu) { |
