On 27.04.2017 08:24, Martin KaFai Lau wrote:
> This patchset introduces the bpf_prog ID and a new bpf cmd to
> iterate all bpf_prog in the system.
> 
> It is still incomplete.  The idea can be extended to bpf_map.
> 
> Martin KaFai Lau (2):
>   bpf: Introduce bpf_prog ID
>   bpf: Test for bpf_prog ID and BPF_PROG_GET_NEXT_ID

Thanks Martin, I like the approach.

I think the progid is also much more suitable to be used in kallsyms
because it handles collisions correctly and let's correctly walk the
chain (for example imaging loading two identical programs but install
them at different hooks, kallsysms doesn't allow to find out which
program is installed where).

It would help a lot if you could pass the prog_id back during program
creation, otherwise it will be kind of difficult to get a hold on which
program is where. ;)

Thanks,
Hannes

Reply via email to