====================================================================== BUILD LOG: pass/lto-nonstatic-to-static ====================================================================== Verdict: pass Exit code: 0 Kernel: 6.19.0+ Toolchain: Compiler: clang version 21.1.8 (Fedora 21.1.8-4.fc43) Linker: LLD 21.1.8 (compatible with GNU linkers) Assembler: Clang integrated assembler ====================================================================== FULL BUILD OUTPUT ====================================================================== --- klp-build stdout --- Validating patch(es) Fixing patch(es) Building patched kernel Copying patched object files Diffing objects vmlinux.o: changed function: klp_test_visibility_proc_show Building patch module: livepatch-lto-nonstatic-to-static.ko SUCCESS --- klp-build stderr --- WARNING: modpost: missing MODULE_DESCRIPTION() in kernel/livepatch/klp_test_mod.o --- diff.log --- vmlinux.o: changed function: klp_test_visibility_proc_show ====================================================================== BUILD VERIFICATION ====================================================================== klp-build exit code is 0 Module exists: livepatch-lto-nonstatic-to-static.ko ELF Analysis: klp_object[0]: .name = NULL (vmlinux) .callbacks = {0} VERIFIED: klp_object.name = NULL (vmlinux) klp_func[0]: .old_name = "klp_test_visibility_proc_show" [-> .rodata+0x5b] .new_func -> klp_test_visibility_proc_show .old_sympos = 0 VERIFIED: klp_func target contains 'klp_test_visibility_proc_show' ThinLTO: CONFIG_LTO_CLANG_THIN=y Original binding: t (expected 'T' = GLOBAL) ====================================================================== TEST PATCH(ES) ====================================================================== --- Patch: lto-nonstatic-to-static.patch --- --- a/kernel/livepatch/klp_test_visibility.c +++ b/kernel/livepatch/klp_test_visibility.c @@ -18,7 +18,7 @@ static int klp_test_nts_var; noinline int klp_test_nts_func(void); -noinline int klp_test_nts_func(void) +static noinline int klp_test_nts_func(void) { klp_test_nts_var += 10; if (klp_test_nts_var > 1000) @@ -28,7 +28,7 @@ noinline int klp_test_nts_func(void) static int klp_test_visibility_proc_show(struct seq_file *m, void *v) { - seq_printf(m, "nts unpatched %d\n", klp_test_nts_func()); + seq_printf(m, "nts patched %d\n", klp_test_nts_func()); return 0; }