Skip to content

kallsyms: Optimize the search for module symbols by livepatch and bpf

Jiri Olsa bpf linux-modules live-patching 2 versions – Applied

Status from this message: This series was applied to bpf/bpf-next.git (master)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest3 patches 6 repliesApplied 3/3
  2. v23 patches 6 repliesSuperseded

Changes in v3 from the cover letter

- fixed off by 1 issue, simplified condition, added acks [Song]
- added module attach as subtest [Andrii]

Patches in v3 All 3 applied

#Subject and filesSizeRepliesApplied
1/3livepatch: Improve the search performance of module_kallsyms_on_each_symbol()include/linux/module.h kernel/livepatch/core.c kernel/module/kallsyms.c +2 more+19 -144 repliesApplied
2/3selftests/bpf: Add serial_test_kprobe_multi_bench_attach_kernel/module teststools/testing/selftests/bpf/prog_tests/kprobe_multi_test.c+14 -50 repliesApplied
3/3bpf: Change modules resolving for kprobe multi linkkernel/trace/bpf_trace.c+47 -462 repliesApplied

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchPetr MladekSong LiuMiroslav BenesLuis ChamberlainZhen Lei
1/3R-b A-b A-b R-b
2/3A-b
3/3R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 5 reviewers.

Read the v3 thread

Cover letter [PATCHv3 bpf-next 0/3] kallsyms: Optimize the search for module symbols by livepatch and bpf

hi,
sending new version of [1] patchset posted originally by Zhen Lei. It contains 2 changes that improove search performance for livepatch and bpf.

v3 changes:
- fixed off by 1 issue, simplified condition, added acks [Song]
- added module attach as subtest [Andrii]

v2 changes:
- reworked the bpf change and meassured the performance
- adding new selftest to benchmark kprobe multi module attachment
- skipping patch 3 as requested by Zhen Lei
- added Reviewed-by for patch 1 [Petr Mladek]

thanks,
jirka

[1] https://lore.kernel.org/bpf/[email protected]/
---
Jiri Olsa (2):
selftests/bpf: Add serial_test_kprobe_multi_bench_attach_kernel/module tests
bpf: Change modules resolving for kprobe multi link

Zhen Lei (1):
livepatch: Improve the search performance of module_kallsyms_on_each_symbol()

 include/linux/module.h                                     |  6 ++++--
 kernel/livepatch/core.c                                    | 10 +---------
 kernel/module/kallsyms.c                                   | 13 ++++++++++++-
 kernel/trace/bpf_trace.c                                   | 93 +++++++++++++++++++++++++++++++++++++++++++++++----------------------------------------------
 kernel/trace/ftrace.c                                      |  2 +-
 tools/testing/selftests/bpf/prog_tests/kprobe_multi_test.c | 19 ++++++++++++++-----
 6 files changed, 79 insertions(+), 64 deletions(-)