Re: [PATCH 33/48] objtool/klp: Extricate checksum calculation from validate_branch()
From: Song Liu
Date: Fri Apr 24 2026 - 18:14:36 EST
On Wed, Apr 22, 2026 at 9:04 PM Josh Poimboeuf <jpoimboe@xxxxxxxxxx> wrote:
>
> In preparation for porting the checksum code to other arches, make its
> functionality independent from the CFG reverse engineering code.
>
> Move it into a standalone calculate_checksums() function which iterates
> all functions and instructions directly, rather than being called inline
> from do_validate_branch().
>
> Since checksum_update_insn() is no longer called during CFG traversal,
> it needs to manually iterate the alternatives.
>
> Signed-off-by: Josh Poimboeuf <jpoimboe@xxxxxxxxxx>
Acked-by: Song Liu <song@xxxxxxxxxx>