Re: Load BPF program at boot-time?
Yonghong Song
On Sun, Sep 6, 2020 at 7:55 AM Shung-Hsi Yu <yu@...> wrote:
It is possible. See the patch below: https://lore.kernel.org/bpf/20200819042759.51280-1-alexei.starovoitov@gmail.com/ I tried to load a BPF program and pin it in bpffs system. The system could be extended to load bpf program, even attach it if other subsystem is ready. But this needs kernel work. What I'm trying to achieve is to trace every single call to a certainbpf program seems a good choice here since it can store arbitrary data in its maps and based on the tracing state, it can stop tracing. There are still some potential issues relating to not recompile kernel and just change bpf programs and recompile bpf programs and rebooting should just work, which is not available today. I guess this probably can be improved. If you are interested, please take a look at the above patch and may improve kernel to cover your use case.
|
|