[Devel] [PATCH hci-8.1 12/14] ms/objtool/klp: Fix cross-module klp relocation section naming
no-reply at sashiko.virtuozzo.com
no-reply at sashiko.virtuozzo.com
Tue Dec 1 03:41:36 MSK 2026
> From: Josh Poimboeuf <jpoimboe at kernel.org>
>
> A klp relocation section is .klp.rela.<objname>.<secname>, where objname
> is the object being patched.
>
> klp-build wrongly derives objname from where the referenced symbol
> lives, not where it's referenced. For a cross-module reference like
> patched can_isotp code calling can.ko's can_rx_unregister(), that gives
> .klp.rela.can..text rather than .klp.rela.can_isotp..text. Unless the
> patch happens to patch can.ko as well, the relocation never gets applied
> and the call goes off into the weeds.
>
> Name the intermediate section __klp_relocs.<objname> so post-link can
> read the patched object's name from there.
>
> Fixes: dd590d4d57eb ("objtool/klp: Introduce klp diff subcommand for diffing object files")
> Reported-by: Joe Lawrence <joe.lawrence at redhat.com>
> Link: https://lore.kernel.org/20260720145658.1103243-2-joe.lawrence@redhat.com
> Acked-by: Song Liu <song at kernel.org>
> Acked-by: Joe Lawrence <joe.lawrence at redhat.com>
> Link: https://patch.msgid.link/ee93a08f3e55e76ffa67d04e283917ddaa893f09.1786138493.git.jpoimboe@kernel.org
> Signed-off-by: Josh Poimboeuf <jpoimboe at kernel.org>
> (cherry picked from commit 07f14d6af9d7791fdc2b44a3dd0693e42c71d2b8)
>
> 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=12
More information about the Devel
mailing list