[Devel] [PATCH hci-8.1 14/14] ms/objtool/klp: Don't match local symbols against exports
no-reply at sashiko.virtuozzo.com
no-reply at sashiko.virtuozzo.com
Tue Dec 1 03:43:34 MSK 2026
> From: Josh Poimboeuf <jpoimboe at kernel.org>
>
> While cloning a reloc, klp diff calls find_export() to determine whether
> the referenced symbol is exported. That decides whether the reference
> needs a klp reloc, which object the klp symbol belongs to, and whether
> the symbol's data needs to be copied into the patch module.
>
> But find_export() matches purely on symbol name, so a static function or
> variable which happens to share its name with an export is mistaken for
> a reference to that export:
>
> - klp_reloc_needed() creates a klp reloc pointing at the exporting
> module's symbol rather than the local one. For a vmlinux export it
> skips the klp reloc altogether, leaving a normal reloc which the
> module loader resolves to the vmlinux symbol.
> [ ... ]
> (cherry picked from commit 86a697572c6271083694025eefa8de518eeef623)
>
> 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=14
More information about the Devel
mailing list