Commit 2bc0575f authored by Tao Chen's avatar Tao Chen Committed by Andrii Nakryiko
Browse files

bpf: Add cookie in fdinfo for raw_tp



Add cookie in fdinfo for raw_tp, the info as follows:

link_type:	raw_tracepoint
link_id:	31
prog_tag:	9dfdf8ef453843bf
prog_id:	32
tp_name:	sys_enter
cookie:	23925373020405760

Signed-off-by: default avatarTao Chen <chen.dylane@linux.dev>
Signed-off-by: default avatarAndrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20250606165818.3394397-5-chen.dylane@linux.dev
parent 380cb6df
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -3654,8 +3654,10 @@ static void bpf_raw_tp_link_show_fdinfo(const struct bpf_link *link,
		container_of(link, struct bpf_raw_tp_link, link);

	seq_printf(seq,
		   "tp_name:\t%s\n",
		   raw_tp_link->btp->tp->name);
		   "tp_name:\t%s\n"
		   "cookie:\t%llu\n",
		   raw_tp_link->btp->tp->name,
		   raw_tp_link->cookie);
}

static int bpf_copy_to_user(char __user *ubuf, const char *buf, u32 ulen,