pkg/init: Mount /sys/fs/bpf

NOTE: This will be a shared mount, due to root being turned into a
shared with `MC_REC` set: `mount("", "/", "", rec|shared, "")`.
For some reason setting `shared` when mounting `/sys/fs/bpf` doesn't
work at all, perhaps that's just a kernel feature.

Signed-off-by: Ilya Dmitrichenko <errordeveloper@gmail.com>
This commit is contained in:
Ilya Dmitrichenko
2020-04-16 15:19:01 +01:00
parent 39aafb21d0
commit 86fb6ba0aa
104 changed files with 105 additions and 103 deletions

View File

@@ -220,6 +220,8 @@ func doMounts() {
mountSilent("fusectl", "/sys/fs/fuse/connections", "fusectl", noexec|nosuid|nodev, "")
mountSilent("selinuxfs", "/sys/fs/selinux", "selinuxfs", noexec|nosuid, "")
mountSilent("pstore", "/sys/fs/pstore", "pstore", noexec|nosuid|nodev, "")
mountSilent("bpffs", "/sys/fs/bpf", "bpf", nodev, "")
mountSilent("efivarfs", "/sys/firmware/efi/efivars", "efivarfs", noexec|nosuid|nodev, "")
// misc /proc mounted fs