When I run sudo bpftool prog show I get the following output
39: socket_filter name bpfprog1 tag e29cda32ba011d7f gpl
loaded_at 2019-09-08T14:21:57+0200 uid 1000
xlated 248B jited 169B memlock 4096B map_ids 30
but If I try to get the program jitted output with the following command
sudo bpftool prog dump jited tag e29cda32ba011d7f
I get an error message, as reported below:
Error: can't get prog info (3): Bad address
QUESTION: what am I doing wrong? XD
Documentation/networking/filter.txtsays: “WhenCONFIG_BPF_JIT_ALWAYS_ONis enabled,bpf_jit_enableis permanently set to 1 and setting any other value than that will return in failure. This is even the case for settingbpf_jit_enableto 2, since dumping the final JIT image into the kernel log is discouraged and introspection through bpftool (undertools/bpf/bpftool/) is the generally recommended approach instead.” Regarding accessing the program by tag, it works for me with a recent bpftool and kernel, so I'd need more data to troubleshoot :/. - Qeole