projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
380cb6d
)
bpf: Add cookie in fdinfo for raw_tp
author
Tao Chen
<chen.dylane@linux.dev>
Fri, 6 Jun 2025 16:58:18 +0000
(
00:58
+0800)
committer
Andrii Nakryiko
<andrii@kernel.org>
Mon, 9 Jun 2025 23:45:17 +0000
(16:45 -0700)
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 <chen.dylane@linux.dev>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link:
https://lore.kernel.org/bpf/20250606165818.3394397-5-chen.dylane@linux.dev
kernel/bpf/syscall.c
patch
|
blob
|
blame
|
history
diff --git
a/kernel/bpf/syscall.c
b/kernel/bpf/syscall.c
index 185cf662451d7dad92d645c30121067f4c4bf8e4..56500381c28aa74a5c3e53ddca650c8d0ccd4b17 100644
(file)
--- a/
kernel/bpf/syscall.c
+++ b/
kernel/bpf/syscall.c
@@
-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,