Re: crosstool: x86 kernel compiled with GCC 14.1 fails to boot
From: Jeff Johnson
Date: Tue Jul 09 2024 - 11:30:19 EST
On 7/8/2024 10:44 PM, Arnd Bergmann wrote:
> On Tue, Jul 9, 2024, at 05:55, Jeff Johnson wrote:
>> On 7/8/2024 6:57 PM, Jeff Johnson wrote:
>>> We tend to enable a lot of debug config options, so I'm wondering if one of
>>> them is contributing to the issue? Guess I'll turn off a bunch of those
>>> options and try again.
>>
>> OK, with a bunch of debug turned off my image boots.
>>
>> Now to find the culprit.
>>
>> Current diff between original config and working config:
>
> Nice! I've tried the reverse now, turning on the options
> you have turned off on top of my defconfig. This version
> still works for me, booting with a plain
> 'qemu-system-x86_64 -kernel arch/x86_64/boot/bzImage'
> and building with my arm64-to-x86 cross compiler.
I picked my favorite to begin with, enabling KASAN (which in turn enabled a
few others). The resulting kernel did not boot for me (just saw a black screen
after the GRUB menu). Diff between working and non-working config is below.
I then downloaded and built the config you supplied. With that I have the same
behavior as my original config, the display is frozen with:
Loading initial ramdisk ...
[jjohnson:laptop 1966] diff .config.old .config
19a20
> CONFIG_CONSTRUCTORS=y
326a328
> CONFIG_GENERIC_CSUM=y
334a337
> CONFIG_KASAN_SHADOW_OFFSET=0xdffffc0000000000
856d858
< CONFIG_VMAP_STACK=y
10935a10938,10940
> CONFIG_STACKDEPOT=y
> CONFIG_STACKDEPOT_ALWAYS_INIT=y
> CONFIG_STACKDEPOT_MAX_FRAMES=64
11033d11037
< # CONFIG_KCSAN is not set
11049c11053,11054
< # CONFIG_SLUB_DEBUG is not set
---
> CONFIG_SLUB_DEBUG=y
> # CONFIG_SLUB_DEBUG_ON is not set
11080c11085,11093
< # CONFIG_KASAN is not set
---
> CONFIG_KASAN=y
> CONFIG_CC_HAS_KASAN_MEMINTRINSIC_PREFIX=y
> CONFIG_KASAN_GENERIC=y
> # CONFIG_KASAN_OUTLINE is not set
> CONFIG_KASAN_INLINE=y
> CONFIG_KASAN_STACK=y
> # CONFIG_KASAN_VMALLOC is not set
> # CONFIG_KASAN_MODULE_TEST is not set
> # CONFIG_KASAN_EXTRA_INFO is not set
11300d11312
< # CONFIG_UNWINDER_GUESS is not set