libbpf / libbpf-bootstrap

Scaffolding for BPF application development with libbpf and BPF CO-RE
BSD 3-Clause "New" or "Revised" License
1.09k stars 294 forks source link

Add an LSM BPF sample program #245

Closed DavadDi closed 9 months ago

DavadDi commented 10 months ago

It requires running on a kernel version >= 5.7 and necessitates the kernel having LSM enabled. For implementation details, please refer to the lsm.c file.

DavadDi commented 9 months ago

Please write a good commit subject and message. Signed-off-by (and copyright, if you are adding it) should have your full properly spelled name.

Can you also add to README listing LSM example and what it's doing? Thanks!

Thank you for your review, README.md document has been added.

anakryiko commented 9 months ago

Hm... we have some build failures on Android (https://github.com/libbpf/libbpf-bootstrap/actions/runs/7656939296/job/20874595591?pr=245) and with llvm-18, but I don't think they are related to your changes.

@waruqi would you be able to check Android issue? thanks!

waruqi commented 9 months ago

The ndk version was upgraded a few days ago. https://github.com/xmake-io/xmake-repo/pull/3159

The latest ndk r26b makes a lot of changes and it breaks a lot of library compilations. We are working on fixing some packages, but it may take some time, but for the time being we can fix the ndk version of the bpf project to r22.