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

From: Stanislaw Gruszka

Date: Wed Nov 18 2026 - 09:51:51 EST


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/20260327110005.16499-1-stf_xl@xxxxx/
- fix searching data symbols for CONFIG_KALLSYMS_ALL
- use kallsyms_symbol_value() in elf_sym_cmp()

v1: https://lore.kernel.org/linux-modules/20260317110423.45481-1-stf_xl@xxxxx/

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(-)

--
2.52.0