Skip to content

module/kallsyms: sort function symbols and use binary search

Stanislaw Gruszka linux-modules linux-trace-kernel live-patching lkml sashiko-reviews 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest3 patches 1 replyIn review
  2. v11 patch 5 repliesSuperseded

Changes in v3 from the cover letter

- preserve core symtab order by sorting a separate index array
- index core text symbols rather than only function symbols
- enable indexed text lookup for livepatch modules
- rebase and update commit messages and subjects
- sort equal-address by descending symbol index so binary search selects the same alias as linear search

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3module/kallsyms: include empty names in is_ignored_kernel_symbol()include/linux/module_symbol.h kernel/module/kallsyms.c scripts/mod/modpost.h+6 -90 replies
2/3module/kallsyms: sort text symbol indices and use binary searchinclude/linux/module.h kernel/module/internal.h kernel/module/kallsyms.c+154 -441 reply
3/3module/kallsyms: enable indexed text lookup for livepatch moduleskernel/module/kallsyms.c+5 -40 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH v3 0/3] module/kallsyms: sort function symbols and use binary search

This series enables binary search over a separate index of core text symbols, preserving symbol-table order and supporting livepatch modules.

v3:
- preserve core symtab order by sorting a separate index array
- index core text symbols rather than only function symbols
- enable indexed text lookup for livepatch modules
- rebase and update commit messages and subjects
- sort equal-address by descending symbol index so binary search selects the same alias as linear search

v2: https://lore.kernel.org/linux-modules/[email protected]/
- fix searching data symbols for CONFIG_KALLSYMS_ALL
- use kallsyms_symbol_value() in elf_sym_cmp()

v1: https://lore.kernel.org/linux-modules/[email protected]/

Stanislaw Gruszka (3):
module/kallsyms: include empty names in is_ignored_kernel_symbol() module/kallsyms: sort text symbol indices and use binary search module/kallsyms: enable indexed text lookup for livepatch modules

 include/linux/module.h        |   2 +
 include/linux/module_symbol.h |   6 +-
 kernel/module/internal.h      |   2 +
 kernel/module/kallsyms.c      | 202 +++++++++++++++++++++++++---------
 scripts/mod/modpost.h         |   2 +-
 5 files changed, 161 insertions(+), 53 deletions(-)
Signature · 1 line
2.52.0