x86-disable-image-size-check-for-test-builds.patch removed from -mm tree
The quilt patch titled
Subject: x86: disable image size check for test builds
has been removed from the -mm tree. Its filename was
x86-disable-image-size-check-for-test-builds.patch
This patch was dropped because it was merged into the mm-hotfixes-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Guenter Roeck <[email protected]>
Subject: x86: disable image size check for test builds
Date: Wed, 16 Apr 2025 18:09:50 -0700
64-bit allyesconfig builds fail with
x86_64-linux-ld: kernel image bigger than KERNEL_IMAGE_SIZE
Bisect points to commit 6f110a5e4f99 ("Disable SLUB_TINY for build testing") as the responsible commit. Reverting that patch does indeed fix the problem. Further analysis shows that disabling SLUB_TINY enables KASAN, and that KASAN is responsible for the image size increase.
Solve the build problem by disabling the image size check for test builds.
[[email protected]: add comment, fix nearby typo (sink->sync)] [[email protected]: fix comment snafu
---
arch/x86/kernel/vmlinux.lds.S | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
arch/x86/kernel/vmlinux.lds.S renamed from arch/x86/kernel/vmlinux.lds.S~x86-disable-image-size-check-for-test-builds +9 -1
@@ -466,10 +466,18 @@ SECTIONS } /* - * The ASSERT() sink to . is intentional, for binutils 2.14 compatibility: + * COMPILE_TEST kernels can be large - CONFIG_KASAN, for example, can cause + * this. Let's assume that nobody will be running a COMPILE_TEST kernel and + * let's assert that fuller build coverage is more valuable than being able to + * run a COMPILE_TEST kernel. + */ +#ifndef CONFIG_COMPILE_TEST +/* + * The ASSERT() sync to . is intentional, for binutils 2.14 compatibility: */ . = ASSERT((_end - LOAD_OFFSET <= KERNEL_IMAGE_SIZE), "kernel image bigger than KERNEL_IMAGE_SIZE"); +#endif /* needed for Clang - see arch/x86/entry/entry.S */ PROVIDE(__ref_stack_chk_guard = __stack_chk_guard);
_
Patches currently in -mm which might be from [email protected] are