diff options
| author | Nikolay Kuratov <kniv@yandex-team.ru> | 2024-12-16 14:19:23 +0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-12-19 18:07:22 +0100 |
| commit | f585c5793aca1186129a7c26009cc7ed077eb0b0 (patch) | |
| tree | 178af973bd2b33964d008612c13b70b9f9215d73 /kernel | |
| parent | b57ac2d92c1f565743f6890a5b9cf317ed856b09 (diff) | |
| download | linux-f585c5793aca1186129a7c26009cc7ed077eb0b0.tar.gz linux-f585c5793aca1186129a7c26009cc7ed077eb0b0.tar.bz2 linux-f585c5793aca1186129a7c26009cc7ed077eb0b0.zip | |
tracing/kprobes: Skip symbol counting logic for module symbols in create_local_trace_kprobe()
commit b022f0c7e404 ("tracing/kprobes: Return EADDRNOTAVAIL when func matches several symbols")
avoids checking number_of_same_symbols() for module symbol in
__trace_kprobe_create(), but create_local_trace_kprobe() should avoid this
check too. Doing this check leads to ENOENT for module_name:symbol_name
constructions passed over perf_event_open.
No bug in newer kernels as it was fixed more generally by
commit 9d8616034f16 ("tracing/kprobes: Add symbol counting check when module loads")
Link: https://lore.kernel.org/linux-trace-kernel/20240705161030.b3ddb33a8167013b9b1da202@kernel.org
Fixes: b022f0c7e404 ("tracing/kprobes: Return EADDRNOTAVAIL when func matches several symbols")
Signed-off-by: Nikolay Kuratov <kniv@yandex-team.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/trace/trace_kprobe.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c index 21aef22a8489..baaaf9bc05f2 100644 --- a/kernel/trace/trace_kprobe.c +++ b/kernel/trace/trace_kprobe.c @@ -1823,7 +1823,7 @@ create_local_trace_kprobe(char *func, void *addr, unsigned long offs, int ret; char *event; - if (func) { + if (func && !strchr(func, ':')) { unsigned int count; count = number_of_same_symbols(func); |
