After commit 68ca5d4eebb8 ("bpf: support BPF cookie in raw tracepoint (raw_tp, tp_btf) programs"), we can show the cookie in bpf_link_info like kprobe etc.
Showing the changes to include/uapi (1 of 3 files). Show all
Unified · Split
| @@ -6651,6 +6651,8 @@ struct bpf_link_info { · 6650 unmodified lines | ||
| 6651 | 6651 | struct { |
| 6652 | 6652 | __aligned_u64 tp_name; /* in/out: tp_name buffer ptr */ |
| 6653 | 6653 | __u32 tp_name_len; /* in/out: tp_name buffer len */ |
| 6654 | + __u32 :32; | |
| 6655 | + __u64 cookie; | |
| 6654 | 6656 | } raw_tracepoint; |
| 6655 | 6657 | struct { |
| 6656 | 6658 | __u32 attach_type; |