====================================================================== BUILD LOG: pass/long/new-local-symbol ====================================================================== Verdict: FAIL Exit code: 1 Kernel: 6.19.0+ Toolchain: Compiler: gcc (GCC) 14.3.1 20251022 (Red Hat 14.3.1-4) Linker: GNU ld version 2.41-63.el10 Assembler: GNU assembler version 2.41-63.el10 ====================================================================== FULL BUILD OUTPUT ====================================================================== --- klp-build stdout --- Validating patch(es) checking file fs/proc/stat.c Hunk #1 succeeded at 79 with fuzz 1 (offset 25 lines). Fixing patch(es) Building patched kernel Copying patched object files Diffing objects vmlinux.o: changed function: show_stat vmlinux.o: changed function: _sub_D_65535_0 vmlinux.o: changed function: _sub_I_65535_1 --- klp-build stderr --- warn: klp-build: /root/linux/tools/testing/selftests/klp-build/tests/current-tree/pass/long/new-local-symbol/new-local-symbol.patch applied with drift vmlinux.o: error: objtool: _sub_D_65535_0+0xc: failed to convert reloc sym '.data..LASAN0' to its proper format error: klp-build: objtool klp diff failed warn: klp-build: line 686: '( cd "$ORIG_DIR"; "${cmd[@]}" > >(tee -a "$log") 2> >(tee -a "$log" | "${filter[@]}" 1>&2) || die "objtool klp diff failed" )' --- diff.log --- vmlinux.o: error: objtool: _sub_D_65535_0+0xc: failed to convert reloc sym '.data..LASAN0' to its proper format vmlinux.o: changed function: show_stat vmlinux.o: changed function: _sub_D_65535_0 vmlinux.o: changed function: _sub_I_65535_1 ====================================================================== BUILD VERIFICATION ====================================================================== ====================================================================== TEST PATCH(ES) ====================================================================== --- Patch: new-local-symbol.patch --- From: Test Author Subject: [PATCH] proc/stat: add stat tracking helper New local symbol livepatch test case. This patch adds a new static helper function and calls it from an existing function to verify klp-build includes new local symbols in the livepatch. diff --git a/fs/proc/stat.c b/fs/proc/stat.c --- a/fs/proc/stat.c +++ b/fs/proc/stat.c @@ -54,6 +54,13 @@ static u64 get_iowait_time(struct kernel_cpustat *kcs, int cpu) return iowait; } +static void klp_test_stat_accessed(void) +{ + static atomic_t call_count = ATOMIC_INIT(0); + atomic_inc(&call_count); + pr_info("klp-build-test: stat accessed %d times\n", atomic_read(&call_count)); +} + static int show_stat(struct seq_file *p, void *v) { int i, j; @@ -92,6 +99,7 @@ static int show_stat(struct seq_file *p, void *v) user = nice = system = idle = iowait = irq = softirq = steal = 0; guest = guest_nice = 0; + klp_test_stat_accessed(); getboottime64(&boottime); /* shift boot timestamp according to the timens offset */ timens_sub_boottime(&boottime);