]> git.ipfire.org Git - thirdparty/linux.git/commit
objtool/klp: Extricate checksum calculation from validate_branch()
authorJosh Poimboeuf <jpoimboe@kernel.org>
Fri, 3 Apr 2026 19:11:17 +0000 (12:11 -0700)
committerJosh Poimboeuf <jpoimboe@kernel.org>
Tue, 5 May 2026 04:16:05 +0000 (21:16 -0700)
commit30cae58cdc13b91035faae3dcc8a96fe8a2daae3
treed7fdfbc046224745fedf144fdf8e2fe2c58a5a69
parent6282e9f46b4fa3ac554852bb1aef17843fc47ee2
objtool/klp: Extricate checksum calculation from validate_branch()

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.

Acked-by: Song Liu <song@kernel.org>
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
tools/objtool/check.c
tools/objtool/include/objtool/checksum.h