You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So, which bpf prog is bpf_prog_f641265f228ac785_YYY[bpf]? As there are multiple bpf_prog_f641265f228ac785_YYY[bpf] in /proc/kallsyms.
A: Provide exact bpf prog info for ksym addresses.
With the aforementioned ebpf PR, pwru is able to retrieve the exact bpf prog info for ksym addresses, even though for subprog's ksym addresses.
Then, as for subprog info for a ksym address, it can be ${subprog function name}:${prog entry function name}[${TYPE}][${ID}][bpf].
As for prog info for a ksym address, it can be ${prog entry function name}[${TYPE}][${ID}][bpf].
At the same time, the prog info for --filter-trace-tc and --filter-trace-xdp will be updated too.
TODOs
Upgrade ebpf library to latest version to retrieve ksyms info and funcs info for a bpf prog.
Prepare new prog info for bpf prog ksym addresses.
# less /proc/kallsyms
ffffffffc135d0d4 t bpf_prog_9cf8e6173844be22_F [bpf]
ffffffffc135f180 t bpf_prog_ab605ebb7ccc37a8_F [bpf]
ffffffffc13c3060 t bpf_prog_9147d89081192601_F [bpf]
ffffffffc13c56dc t bpf_prog_96d55732a81d4096_F [bpf]
ffffffffc135d0d4 t bpf_prog_bd58215f88be5281_kprobe_skb_3 [bpf]
ffffffffc135f180, ffffffffc13c3060 and ffffffffc13c56dc are the ksym addresses for kprobe_skb_3's subprogs.
And the symbols for these subprogs are F instead of their function names.
With the aforementioned PR, pwru is able to retrieve these ksym addresses alongside the function names for these subprogs. Then, pwru is able to show the exact info for subprogs' ksym addresses.
When I deep dive into
struct bpf_prog_info
, I find that we can retrieve ksyms and ksyms' corresponding func info byProgramInfo
(see ebpf PR info: expose ksym info and func info by ProgramInfo).Q: For
--output-stack
, what is the exact bpf prog tracked?For example, use one tc-bpf code for multiple pods in k8s env:
And, what if
pwru --output-stack --filter-track-bpf-helpers
?So, which bpf prog is
bpf_prog_f641265f228ac785_YYY[bpf]
? As there are multiplebpf_prog_f641265f228ac785_YYY[bpf]
in/proc/kallsyms
.A: Provide exact bpf prog info for ksym addresses.
With the aforementioned ebpf PR, pwru is able to retrieve the exact bpf prog info for ksym addresses, even though for subprog's ksym addresses.
Then, as for subprog info for a ksym address, it can be
${subprog function name}:${prog entry function name}[${TYPE}][${ID}][bpf]
.As for prog info for a ksym address, it can be
${prog entry function name}[${TYPE}][${ID}][bpf]
.At the same time, the prog info for
--filter-trace-tc
and--filter-trace-xdp
will be updated too.TODOs
@brb @jschwinger233 WDYT?
The text was updated successfully, but these errors were encountered: