On Fri, Nov 21 2025, Thorsten Leemhuis wrote:
On 11/21/25 14:11, Greg Kroah-Hartman wrote:
6.17-stable review patch. If anyone has any objections, please let me know.
From: Pasha Tatashin pasha.tatashin@soleen.com
commit e38f65d317df1fd2dcafe614d9c537475ecf9992 upstream.
Patch series "KHO: kfence + KHO memory corruption fix", v3.
This series fixes a memory corruption bug in KHO that occurs when KFENCE is enabled.
I ran into a build problem that afaics is caused by this change:
""" In file included from ./arch/x86/include/asm/bug.h:103, from ./arch/x86/include/asm/alternative.h:9, from ./arch/x86/include/asm/barrier.h:5, from ./include/asm-generic/bitops/generic-non-atomic.h:7, from ./include/linux/bitops.h:28, from ./include/linux/bitmap.h:8, from ./include/linux/nodemask.h:91, from ./include/linux/numa.h:6, from ./include/linux/cma.h:7, from kernel/kexec_handover.c:12: kernel/kexec_handover.c: In function ‘kho_preserve_phys’: kernel/kexec_handover.c:732:41: error: ‘nr_pages’ undeclared (first use in this function); did you mean ‘dir_pages’? 732 | nr_pages << PAGE_SHIFT))) { | ^~~~~~~~
8375b76517cb5 ("kho: replace kho_preserve_phys() with kho_preserve_pages()") refactored this function to work on page granularity (nr_pages) instead of bytes (size). Since that commit wasn't backported, nr_pages does not exist.
Simple fix should be to replace "nr_pages << PAGE_SHIFT" with "size".
./include/asm-generic/bug.h:123:32: note: in definition of macro ‘WARN_ON’ 123 | int __ret_warn_on = !!(condition); \ | ^~~~~~~~~ kernel/kexec_handover.c:732:41: note: each undeclared identifier is reported only once for each function it appears in 732 | nr_pages << PAGE_SHIFT))) { | ^~~~~~~~ ./include/asm-generic/bug.h:123:32: note: in definition of macro ‘WARN_ON’ 123 | int __ret_warn_on = !!(condition); \ | ^~~~~~~~~ make[3]: *** [scripts/Makefile.build:287: kernel/kexec_handover.o] Error 1 make[3]: *** Waiting for unfinished jobs.... make[2]: *** [scripts/Makefile.build:556: kernel] Error 2 make[2]: *** Waiting for unfinished jobs.... make[1]: *** [/builddir/build/BUILD/kernel-6.17.9-build/kernel-6.17.9-rc1/linux-6.17.9-0.rc1.300.vanilla.fc43.x86_64/Makefile:2019: .] Error 2 make: *** [Makefile:256: __sub-make] Error 2
[...]