cilium / pwru

Packet, where are you? -- eBPF-based Linux kernel networking debugger
Apache License 2.0
2.88k stars 176 forks source link

Improve --filter-track-bpf-helpers #433

Closed Asphaltt closed 1 month ago

Asphaltt commented 1 month ago

It failed to run ./pwru --filter-track-bpf-helpers --filter-trace-tc --filter-func '.*udp.*' --output-limit-lines 10 icmp, because fentry does not support PT_REGS_FP(ctx).

And, skip doing kprobe on bpf progs when run --filter-track-bpf-helpers.

Signed-off-by: Leon Hwang hffilwlqm@gmail.com

Asphaltt commented 1 month ago
    if (cfg->track_skb_by_stackid && tracked_by != TRACKED_BY_STACKID) {
        u64 *old_stackid = bpf_map_lookup_elem(&skb_stackid, &skb);
        if (old_stackid && *old_stackid != stackid) {
            bpf_map_delete_elem(&stackid_skb, old_stackid);
        }

is_kprobe is missing here.

I'll add it later.