On Mon, 2022-01-31 at 22:45 -0800, Andrii Nakryiko wrote: ...... cut ...... > For multi-attach fentry, we could use the same approach if we let > either bpf_link or bpf_prog available to fentry/fexit program at > runtime. Kui-Feng seems to be storing prog_id in BPF trampoline > generated code, I don't think that's the best approach, it would be > probably better to store bpf_link or bpf_prog pointer, whichever is > more convenient. I think we can't attach the same BPF program twice > to FYI, the prog_id used is casting from a bpf_prog pointer. It gets a bpf_prog by casting a prog_id back.