mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 09:04:39 +02:00
bpf: Add cookie to raw_tp bpf_link_info
After commit 68ca5d4eeb ("bpf: support BPF cookie in raw tracepoint
(raw_tp, tp_btf) programs"), we can show the cookie in bpf_link_info
like kprobe etc.
Signed-off-by: Tao Chen <chen.dylane@linux.dev>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Link: https://lore.kernel.org/bpf/20250603154309.3063644-1-chen.dylane@linux.dev
This commit is contained in:
parent
7fdaba9129
commit
2fe1c59347
|
|
@ -6651,6 +6651,8 @@ struct bpf_link_info {
|
|||
struct {
|
||||
__aligned_u64 tp_name; /* in/out: tp_name buffer ptr */
|
||||
__u32 tp_name_len; /* in/out: tp_name buffer len */
|
||||
__u32 :32;
|
||||
__u64 cookie;
|
||||
} raw_tracepoint;
|
||||
struct {
|
||||
__u32 attach_type;
|
||||
|
|
|
|||
|
|
@ -3688,6 +3688,7 @@ static int bpf_raw_tp_link_fill_link_info(const struct bpf_link *link,
|
|||
return -EINVAL;
|
||||
|
||||
info->raw_tracepoint.tp_name_len = tp_len + 1;
|
||||
info->raw_tracepoint.cookie = raw_tp_link->cookie;
|
||||
|
||||
if (!ubuf)
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -6651,6 +6651,8 @@ struct bpf_link_info {
|
|||
struct {
|
||||
__aligned_u64 tp_name; /* in/out: tp_name buffer ptr */
|
||||
__u32 tp_name_len; /* in/out: tp_name buffer len */
|
||||
__u32 :32;
|
||||
__u64 cookie;
|
||||
} raw_tracepoint;
|
||||
struct {
|
||||
__u32 attach_type;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user