History log of /linux/tools/objtool/klp-sympos.c (Results 1 – 3 of 3)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# a0acd94e 18-Aug-2026 Linus Torvalds <torvalds@linux-foundation.org>

Merge tag 'objtool-core-2026-08-17' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull objtool updates from Ingo Molnar:

- Fix various klp-build bugs reported by Joe Lawrence (Josh Poim

Merge tag 'objtool-core-2026-08-17' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull objtool updates from Ingo Molnar:

- Fix various klp-build bugs reported by Joe Lawrence (Josh Poimboeuf,
Joe Lawrence)

- Misc fixes and cleanups (Puranjay Mohan, Thomas Huth and Ingo Molnar)

* tag 'objtool-core-2026-08-17' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
objtool/klp: Fix vmlinux klp relocations for EXPORT_SYMBOL_FOR_MODULES()
objtool/klp: Fix .kcfi_traps special section extraction
objtool/klp: Fix vmlinux .klp.symid link error for .exitcall.exit symbols
objtool/klp: Fix line numbers in Module.symvers parse errors
objtool/klp: Fix relocations for EXPORT_SYMBOL_FOR_MODULES() symbols
objtool/klp: Allow new references to module exports
objtool/klp: Don't match local symbols against exports
objtool/klp: Fix cross-module klp relocation section naming
objtool/klp: Explicitly disallow patching or referencing init code/data
objtool/klp: Ignore replacement offset of empty x86 alternatives
objtool/klp: Fix size of empty special section entries
objtool/klp: Fix vmlinux .klp.symid link error for .no_trim_symbol symbols
objtool/headers: Sync tools/include/linux/objtool_types.h with include/linux/objtool_types.h
objtool: Replace __ASSEMBLY__ with __ASSEMBLER__ in header files
objtool/klp: Fix symbol resolution for duplicate data symbols
objtool/klp: Add .klp.symid for sympos disambiguation
objtool/klp: Skip hidden directories when finding objects
objtool/klp: Fix false module dependencies caused by dead relocs
objtool/klp: Normalize Module.symvers paths to module names
objtool/klp: Fix module name normalization for paths with dots

show more ...


Revision tags: v7.2, v7.2-rc7
# 69f361b8 07-Aug-2026 Josh Poimboeuf <jpoimboe@kernel.org>

objtool/klp: Explicitly disallow patching or referencing init code/data

Explicitly disallow the patching and referencing of init code/data.
Otherwise it could potentially introduce some odd edge cas

objtool/klp: Explicitly disallow patching or referencing init code/data

Explicitly disallow the patching and referencing of init code/data.
Otherwise it could potentially introduce some odd edge cases depending
on whether the target object's init section has been freed yet (note
that the init code still exists in the target module when doing late
module patching).

Such edge cases include sympos calculation and the patching and/or
referencing of non-existent (init-freed) code/data. Not to mention the
inherent differences in behavior that occur when the init code is only
patched *some* of the time depending on module loading order or kernel
config.

Acked-by: Joe Lawrence <joe.lawrence@redhat.com>
Acked-by: Song Liu <song@kernel.org>
Link: https://patch.msgid.link/516e14f84cfbffa27dc19d3dcf35097504097966.1786138493.git.jpoimboe@kernel.org
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>

show more ...


# 15fa203e 03-Aug-2026 Josh Poimboeuf <jpoimboe@kernel.org>

objtool/klp: Fix symbol resolution for duplicate data symbols

find_sympos() calculates a sympos used by livepatch to disambiguate
duplicately-named symbols. For function symbols, there's a hack whi

objtool/klp: Fix symbol resolution for duplicate data symbols

find_sympos() calculates a sympos used by livepatch to disambiguate
duplicately-named symbols. For function symbols, there's a hack which
counts .text.unlikely symbols before other .text symbols, matching the
linker script's section ordering.

Not only is the hack fragile, data symbols can have the same problem.
So for example, adding a reference to pwq_cache in
ep_unregister_pollwait() can trigger a corrupt sympos and a relocation
to the wrong pwq_cache symbol in the livepatch module, resulting in a
crash or undefined behavior.

Remove the existing hack in favor of a fully deterministic solution,
using the new .klp.symid table to derive the symbol-to-id mapping from
the original vmlinux.o and the id-to-address mapping from the
corresponding vmlinux, which can then be used to determine the exact
sympos associated with the original vmlinux.

Modules don't need any special treatment: the .ko has the same
section/symbol ordering as the original whole-archive symbol table.

Fixes: dd590d4d57eb ("objtool/klp: Introduce klp diff subcommand for diffing object files")
Reported-by: Ben Procknow <bprockno@redhat.com>
Reported-by: Joe Lawrence <joe.lawrence@redhat.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: live-patching@vger.kernel.org
Link: https://lore.kernel.org/20260710153042.3156788-1-joe.lawrence@redhat.com
Link: https://lore.kernel.org/20260724221730.3126529-1-joe.lawrence@redhat.com
Link: https://patch.msgid.link/919785e3bf2245db02ff6391e735d9cb139170b1.1785727106.git.jpoimboe@kernel.org

show more ...