Skip to content

Commit 380cb6d

Browse files
Tao Chenanakryiko
authored andcommitted
bpf: Add cookie in fdinfo for tracing
Add cookie in fdinfo for tracing, the info as follows: link_type: tracing link_id: 6 prog_tag: 9dfdf8ef453843bf prog_id: 35 attach_type: 25 target_obj_id: 1 target_btf_id: 60355 cookie: 9007199254740992 Signed-off-by: Tao Chen <[email protected]> Signed-off-by: Andrii Nakryiko <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
1 parent ad954cb commit 380cb6d

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
@@ -3403,10 +3403,12 @@ static void bpf_tracing_link_show_fdinfo(const struct bpf_link *link,
34033403
seq_printf(seq,
34043404
"attach_type:\t%d\n"
34053405
"target_obj_id:\t%u\n"
3406-
"target_btf_id:\t%u\n",
3406+
"target_btf_id:\t%u\n"
3407+
"cookie:\t%llu\n",
34073408
tr_link->attach_type,
34083409
target_obj_id,
3409-
target_btf_id);
3410+
target_btf_id,
3411+
tr_link->link.cookie);
34103412
}
34113413

34123414
static int bpf_tracing_link_fill_link_info(const struct bpf_link *link,

0 commit comments

Comments
 (0)