]> git.baikalelectronics.ru Git - kernel.git/commit
libbpf: Support repeated legacy kprobes on same function
authorQiang Wang <wangqiang.wq.frank@bytedance.com>
Mon, 27 Dec 2021 13:07:13 +0000 (21:07 +0800)
committerAndrii Nakryiko <andrii@kernel.org>
Wed, 5 Jan 2022 23:38:21 +0000 (15:38 -0800)
commit28e9ac98b14a667bc2c3c99823afdfe2f5d549ce
treee0db3dd9af7a9781ada553e46fc718f8c2b6f9e4
parent1ba6f4ad9b455d108af1b4c314974d9c5084ce1f
libbpf: Support repeated legacy kprobes on same function

If repeated legacy kprobes on same function in one process,
libbpf will register using the same probe name and got -EBUSY
error. So append index to the probe name format to fix this
problem.

Co-developed-by: Chengming Zhou <zhouchengming@bytedance.com>
Signed-off-by: Qiang Wang <wangqiang.wq.frank@bytedance.com>
Signed-off-by: Chengming Zhou <zhouchengming@bytedance.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20211227130713.66933-2-wangqiang.wq.frank@bytedance.com
tools/lib/bpf/libbpf.c