Просмотр исходного кода

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 <[email protected]>
[[email protected]: bumped PKG_RELEASE]
Signed-off-by: Daniel Golle <[email protected]>
Tony Ambardar 5 лет назад
Родитель
Сommit
217877d046
2 измененных файлов с 2 добавлено и 1 удалено
  1. 1 1
      package/base-files/Makefile
  2. 1 0
      package/base-files/files/etc/init.d/boot

+ 1 - 1
package/base-files/Makefile

@@ -12,7 +12,7 @@ include $(INCLUDE_DIR)/version.mk
 include $(INCLUDE_DIR)/feeds.mk
 
 PKG_NAME:=base-files
-PKG_RELEASE:=224
+PKG_RELEASE:=225
 PKG_FLAGS:=nonshared
 
 PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/

+ 1 - 0
package/base-files/files/etc/init.d/boot

@@ -35,6 +35,7 @@ boot() {
 	touch /tmp/resolv.conf.d/resolv.conf.auto
 	ln -sf /tmp/resolv.conf.d/resolv.conf.auto /tmp/resolv.conf
 	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