Commit f8a0569
libbpf: Work around kernel inconsistently stripping '.llvm.' suffix
Some versions of kernel were stripping out '.llvm.<hash>' suffix from
kerne symbols (produced by Clang LTO compilation) from function names
reported in available_filter_functions, while kallsyms reported full
original name. This confuses libbpf's multi-kprobe logic of finding all
matching kernel functions for specified user glob pattern by joining
available_filter_functions and kallsyms contents, because joining by
full symbol name won't work for symbols containing '.llvm.<hash>' suffix.
This was eventually fixed by [0] in the kernel, but we'd like to not
regress multi-kprobe experience and add a work around for this bug on
libbpf side, stripping kallsym's name if it matches user pattern and
contains '.llvm.' suffix.
[0] fb6a421 ("kallsyms: Match symbols exactly with CONFIG_LTO_CLANG")
Signed-off-by: Andrii Nakryiko <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Acked-by: Yonghong Song <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]1 parent b53b63d commit f8a0569
1 file changed
+25
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11387 | 11387 | | |
11388 | 11388 | | |
11389 | 11389 | | |
11390 | | - | |
| 11390 | + | |
11391 | 11391 | | |
11392 | 11392 | | |
| 11393 | + | |
| 11394 | + | |
| 11395 | + | |
| 11396 | + | |
| 11397 | + | |
| 11398 | + | |
| 11399 | + | |
| 11400 | + | |
| 11401 | + | |
| 11402 | + | |
| 11403 | + | |
| 11404 | + | |
| 11405 | + | |
| 11406 | + | |
| 11407 | + | |
| 11408 | + | |
| 11409 | + | |
| 11410 | + | |
| 11411 | + | |
| 11412 | + | |
| 11413 | + | |
| 11414 | + | |
| 11415 | + | |
| 11416 | + | |
11393 | 11417 | | |
11394 | 11418 | | |
11395 | 11419 | | |
| |||
0 commit comments