Skip to content

Commit 2bc0575

Browse files
Tao Chenanakryiko
authored andcommitted
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: Tao Chen <[email protected]> Signed-off-by: Andrii Nakryiko <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
1 parent 380cb6d commit 2bc0575

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

kernel/bpf/syscall.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3654,8 +3654,10 @@ static void bpf_raw_tp_link_show_fdinfo(const struct bpf_link *link,
36543654
container_of(link, struct bpf_raw_tp_link, link);
36553655

36563656
seq_printf(seq,
3657-
"tp_name:\t%s\n",
3658-
raw_tp_link->btp->tp->name);
3657+
"tp_name:\t%s\n"
3658+
"cookie:\t%llu\n",
3659+
raw_tp_link->btp->tp->name,
3660+
raw_tp_link->cookie);
36593661
}
36603662

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

0 commit comments

Comments
 (0)