[Devel] [PATCH hci-8.1 11/14] ms/objtool/klp: Normalize Module.symvers paths to module names
no-reply at sashiko.virtuozzo.com
no-reply at sashiko.virtuozzo.com
Tue Dec 1 03:40:45 MSK 2026
> From: Joe Lawrence <joe.lawrence at redhat.com>
>
> Module.symvers contains build-tree object paths as module identifiers
> (e.g., "arch/x86/kvm/kvm") rather than runtime module names ("kvm").
> Objtool's clone_reloc_klp() uses this field directly for exported
> symbols, while unexported symbols correctly go through __find_modname().
>
> This means that exported symbol relocations may land in a .klp.rela
> section named with the build path rather than the module name. That is
> a crash waiting to happen: the kernel's livepatch loader silently skips
> this relocation because it doesn't match the expected klp_object name.
> The unresolved relocation sits in the newly activated code, crashing
> when executed.
>
> Normalize export->mod at Module.symvers read time using the same logic
> [ ... ]
> (cherry picked from commit 8668bf91e0508abeb8e98b4edd89032be02228a1)
>
> https://virtuozzo.atlassian.net/browse/VSTOR-157133
> Feature: klp-build support
> Signed-off-by: Konstantin Khorenko <khorenko at virtuozzo.com>
Sashiko has reviewed this patch and found no issues.
Carry the trailer below into the next revision and Sashiko will not review this patch again.
Reviewed-by: Sashiko <no-reply at sashiko.virtuozzo.com>
--
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261126-khorenko-vstor-157133-klp-and-kvm-fixes-v1-0-0ec8eaadf1bc@virtuozzo.com?part=11
More information about the Devel
mailing list