linux/tools/objtool
Josh Poimboeuf 24ebfcd65a livepatch/klp-build: Introduce klp-build script for generating livepatch modules
Add a klp-build script which automates the generation of a livepatch
module from a source .patch file by performing the following steps:

  - Builds an original kernel with -function-sections and
    -fdata-sections, plus objtool function checksumming.

  - Applies the .patch file and rebuilds the kernel using the same
    options.

  - Runs 'objtool klp diff' to detect changed functions and generate
    intermediate binary diff objects.

  - Builds a kernel module which links the diff objects with some
    livepatch module init code (scripts/livepatch/init.c).

  - Finalizes the livepatch module (aka work around linker wreckage)
    using 'objtool klp post-link'.

Acked-by: Petr Mladek <pmladek@suse.com>
Tested-by: Joe Lawrence <joe.lawrence@redhat.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
2025-10-14 14:50:19 -07:00
..
arch objtool/klp: Introduce klp diff subcommand for diffing object files 2025-10-14 14:50:18 -07:00
Documentation objtool: Fix up some outdated references to ENTRY/ENDPROC 2025-03-25 09:20:27 +01:00
include/objtool objtool: Add base objtool support for livepatch modules 2025-10-14 14:50:18 -07:00
.gitignore objtool: Install libsubcmd in build 2023-01-30 16:27:46 -08:00
Build objtool/klp: Add post-link subcommand to finalize livepatch modules 2025-10-14 14:50:18 -07:00
builtin-check.c objtool/klp: Add --debug-checksum=<funcs> to show per-instruction checksums 2025-10-14 14:50:18 -07:00
builtin-klp.c objtool/klp: Add post-link subcommand to finalize livepatch modules 2025-10-14 14:50:18 -07:00
check.c objtool: Add base objtool support for livepatch modules 2025-10-14 14:50:18 -07:00
elf.c objtool: Add base objtool support for livepatch modules 2025-10-14 14:50:18 -07:00
klp-diff.c livepatch/klp-build: Introduce klp-build script for generating livepatch modules 2025-10-14 14:50:19 -07:00
klp-post-link.c objtool/klp: Add post-link subcommand to finalize livepatch modules 2025-10-14 14:50:18 -07:00
Makefile objtool/klp: Introduce klp diff subcommand for diffing object files 2025-10-14 14:50:18 -07:00
noreturns.h x86/sev: Zap snp_abort() 2025-09-04 13:15:59 +02:00
objtool.c objtool/klp: Add --debug option to show cloning decisions 2025-10-14 14:50:18 -07:00
orc_dump.c objtool: Add annotype() helper 2025-10-14 14:46:49 -07:00
orc_gen.c objtool: Add annotype() helper 2025-10-14 14:46:49 -07:00
special.c objtool: Add annotype() helper 2025-10-14 14:46:49 -07:00
sync-check.sh objtool/klp: Introduce klp diff subcommand for diffing object files 2025-10-14 14:50:18 -07:00
weak.c objtool/klp: Introduce klp diff subcommand for diffing object files 2025-10-14 14:50:18 -07:00