From b0e052f99b68c6a10637ba5f693c89318ec795da Mon Sep 17 00:00:00 2001 From: Tony Ambardar Date: Wed, 22 Jul 2020 06:28:06 -0700 Subject: [PATCH] base-files: mount bpffs at boot Explicitly mount the BPF filesystem if available. This is used for pinning eBPF programs and maps, making them accessible to other eBPF programs or from userspace with the help of libbpf or bpftool. Signed-off-by: Tony Ambardar [daniel@makrotopia.org: bumped PKG_RELEASE] Signed-off-by: Daniel Golle --- package/base-files/Makefile | 2 +- package/base-files/files/etc/init.d/boot | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 4dec9291d7..74ca8426a3 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -12,7 +12,7 @@ include $(INCLUDE_DIR)/version.mk include $(INCLUDE_DIR)/feeds.mk PKG_NAME:=base-files -PKG_RELEASE:=202 +PKG_RELEASE:=203 PKG_FLAGS:=nonshared PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/ diff --git a/package/base-files/files/etc/init.d/boot b/package/base-files/files/etc/init.d/boot index 7551710433..70dc6464cb 100755 --- a/package/base-files/files/etc/init.d/boot +++ b/package/base-files/files/etc/init.d/boot @@ -36,6 +36,7 @@ boot() { ln -sf /tmp/resolv.conf.d/resolv.conf.auto /tmp/resolv.conf ln -sf /tmp/resolv.conf.d/resolv.conf.auto /tmp/resolv.conf.auto grep -q debugfs /proc/filesystems && /bin/mount -o noatime -t debugfs debugfs /sys/kernel/debug + grep -q bpf /proc/filesystems && /bin/mount -o nosuid,nodev,noexec,noatime,mode=0700 -t bpf bpffs /sys/fs/bpf [ "$FAILSAFE" = "true" ] && touch /tmp/.failsafe /sbin/kmodloader