Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2cba6f2e authored by Chenbo Feng's avatar Chenbo Feng
Browse files

Mount eBPF file system and cgroupv2 root directory

Mount the eBPF file system under /sys/fs/bpf to allow netd to pin and
retrieve persistent eBPF map object from the file system. It helps the
system to maintain a consistent eBPF data store when netd crashed and
restart. Mount the cgroupv2 module and use the root folder of it to
monitor network statistics through eBPF program attached.

Test: eBPF map object show up under /sys/fs/bpf after netd start.
Bug: 30950746
Change-Id: Ie475112116603798fe75a75c5a84f4bbe5b942ec
parent 4ba3ebbc
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -218,6 +218,12 @@ on init
    # This is needed by any process that uses socket tagging.
    chmod 0644 /dev/xt_qtaguid

    mkdir /dev/cg2_bpf
    mount cgroup2 cg2_bpf /dev/cg2_bpf
    chown root root /dev/cg2_bpf
    chmod 0600 /dev/cg2_bpf
    mount bpf bpf /sys/fs/bpf

    # Create location for fs_mgr to store abbreviated output from filesystem
    # checker programs.
    mkdir /dev/fscklogs 0770 root system