Skip to contentSkip to conversation

crosstool: x86 kernel compiled with GCC 14.1 fails to boot

DISCUSSION Kalle Valo 4 participants 9 messages Jul 8, 2024 – Jul 9, 2024 Qualcomm ATH12K wireless driver

lore
Share & tools
lore

Kalle Valo

author
#0 lore raw

Hi Arnd,

I installed GCC 14.1 from:

https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/14.1.0/

But I have a problem that a kernel compiled with that compiler fails to boot on my x86 NUC test box. I don't see any errors, just black screen and I assume after that the kernel either crashes or reboots and goes to back to the GRUB menu. This loop seems to continue forever. GCC 13.2 and older from crosstool work just fine.

Do you happen to have any ideas what could cause this or how to debug further?

Kalle

#1 lore raw
Quoted 6 lines · Kalle Valo

Hi Arnd,

I installed GCC 14.1 from:

https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/14.1.0/

Quoted 8 lines

But I have a problem that a kernel compiled with that compiler fails to boot on my x86 NUC test box. I don't see any errors, just black screen and I assume after that the kernel either crashes or reboots and goes to back to the GRUB menu. This loop seems to continue forever. GCC 13.2 and older from crosstool work just fine.

Do you happen to have any ideas what could cause this or how to debug further?

Thanks for the report. Unfortunately I have no idea what the problem may be, and so far nobody else has reported this.

For debugging, what I'd try first is to run the same kernel in qemu to see if that works, or attach gdb and step through the early boot if it doesn't.

I have tried reproducing it, but with my arm64 hosted x86-64 cross-compiler, it boots a defconfig x86-64 kernel in qemu just fine.

Arnd

#2 lore raw
Quoted 12 lines · Arnd Bergmann
Quoted 11 lines · Kalle Valo

Hi Arnd,

I installed GCC 14.1 from:

https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_6
4/14.1.0/

But I have a problem that a kernel compiled with that compiler fails to
boot on my x86 NUC test box. I don't see any errors, just black screen

...

Quoted 5 lines

Thanks for the report. Unfortunately I have no idea what the problem may be, and so far nobody else has reported this.

...

Quoted 2 lines

     Arnd

Another data point in case it's helpful.

I  have been compiling on Archlinux using the native gcc 14.1 toolchain since early May.

I have had no problems at all booting and running either stable or mainline on several x86-64 machines including 2 NUCs. One is NUC6i5SYB and the other is NUC10i5FNK.

Gene

#3 lore raw
In reply to Kalle Valo
Quoted 11 lines · Kalle Valo

Hi Arnd,

I installed GCC 14.1 from:

https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/14.1.0/

But I have a problem that a kernel compiled with that compiler fails to boot on my x86 NUC test box. I don't see any errors, just black screen and I assume after that the kernel either crashes or reboots and goes to back to the GRUB menu. This loop seems to continue forever. GCC 13.2 and older from crosstool work just fine.

I had held off moving to 14.1 due to Kalle's issue as well as one other internally-reported issue, but since a few others said they didn't have issues, I thought I'd try it out for my laptop build in case it is just a NUC-related issue.

And what I'm seeing after reboot and selecting the new image from GRUB is:
Loading Linux 6.10-rc6-wt-ath+ ...
Loading initial ramdisk ...

and that's it. It sits there with that on the display.

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.

/jeff

#4 lore raw
Quoted 3 lines · Jeff Johnson

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:

20d19
< CONFIG_CONSTRUCTORS=y
328d326
< CONFIG_GENERIC_CSUM=y
337d334
< CONFIG_KASAN_SHADOW_OFFSET=0xdffffc0000000000
858a856

Quoted 1 line

CONFIG_VMAP_STACK=y

10938,10940d10935
< CONFIG_STACKDEPOT=y
< CONFIG_STACKDEPOT_ALWAYS_INIT=y
< CONFIG_STACKDEPOT_MAX_FRAMES=64
10996,10997d10990
< CONFIG_ARCH_WANT_FRAME_POINTERS=y
< CONFIG_FRAME_POINTER=y
10999d10991
< CONFIG_STACK_VALIDATION=y
11040a11033

Quoted 1 line

# CONFIG_KCSAN is not set

11056,11057c11049
< CONFIG_SLUB_DEBUG=y
< # CONFIG_SLUB_DEBUG_ON is not set
---

Quoted 1 line

# CONFIG_SLUB_DEBUG is not set

11060c11052
< CONFIG_PAGE_POISONING=y
---

Quoted 1 line

# CONFIG_PAGE_POISONING is not set

11064c11056
< CONFIG_DEBUG_WX=y
---

Quoted 1 line

# CONFIG_DEBUG_WX is not set

11066d11057
< CONFIG_PTDUMP_CORE=y
11069,11072c11060
< CONFIG_DEBUG_KMEMLEAK=y
< CONFIG_DEBUG_KMEMLEAK_MEM_POOL_SIZE=16000
< # CONFIG_DEBUG_KMEMLEAK_DEFAULT_OFF is not set
< CONFIG_DEBUG_KMEMLEAK_AUTO_SCAN=y
---

Quoted 1 line

# CONFIG_DEBUG_KMEMLEAK is not set

11074,11081c11062
< CONFIG_DEBUG_OBJECTS=y
< # CONFIG_DEBUG_OBJECTS_SELFTEST is not set
< # CONFIG_DEBUG_OBJECTS_FREE is not set
< CONFIG_DEBUG_OBJECTS_TIMERS=y
< CONFIG_DEBUG_OBJECTS_WORK=y
< CONFIG_DEBUG_OBJECTS_RCU_HEAD=y
< CONFIG_DEBUG_OBJECTS_PERCPU_COUNTER=y
< CONFIG_DEBUG_OBJECTS_ENABLE_DEFAULT=1
---

Quoted 1 line

# CONFIG_DEBUG_OBJECTS is not set

11084c11065
< CONFIG_SCHED_STACK_END_CHECK=y
---

Quoted 1 line

# CONFIG_SCHED_STACK_END_CHECK is not set

11091c11072
< CONFIG_MEMORY_NOTIFIER_ERROR_INJECT=m
---

Quoted 1 line

# CONFIG_MEMORY_NOTIFIER_ERROR_INJECT is not set

11099,11107c11080
< 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
---

Quoted 1 line

# CONFIG_KASAN is not set

11109,11114c11082
< CONFIG_KFENCE=y
< CONFIG_KFENCE_SAMPLE_INTERVAL=0
< CONFIG_KFENCE_NUM_OBJECTS=255
< # CONFIG_KFENCE_DEFERRABLE is not set
< # CONFIG_KFENCE_STATIC_KEYS is not set
< CONFIG_KFENCE_STRESS_TEST_FAULTS=0
---

Quoted 1 line

# CONFIG_KFENCE is not set

11126,11128c11094
< CONFIG_LOCKUP_DETECTOR=y
< CONFIG_SOFTLOCKUP_DETECTOR=y
< # CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
---

Quoted 1 line

# CONFIG_SOFTLOCKUP_DETECTOR is not set

11130,11135c11096
< CONFIG_HARDLOCKUP_DETECTOR=y
< # CONFIG_HARDLOCKUP_DETECTOR_PREFER_BUDDY is not set < CONFIG_HARDLOCKUP_DETECTOR_PERF=y
< # CONFIG_HARDLOCKUP_DETECTOR_BUDDY is not set < # CONFIG_HARDLOCKUP_DETECTOR_ARCH is not set < CONFIG_HARDLOCKUP_DETECTOR_COUNTS_HRTIMER=y
---

Quoted 1 line

# CONFIG_HARDLOCKUP_DETECTOR is not set

11137,11140c11098
< # CONFIG_BOOTPARAM_HARDLOCKUP_PANIC is not set
< CONFIG_DETECT_HUNG_TASK=y
< CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120
< # CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set
---

Quoted 1 line

# CONFIG_DETECT_HUNG_TASK is not set

11149c11107
< CONFIG_SCHED_DEBUG=y
---

Quoted 1 line

# CONFIG_SCHED_DEBUG is not set

11151c11109
< CONFIG_SCHEDSTATS=y
---

Quoted 1 line

# CONFIG_SCHEDSTATS is not set

11161,11162c11119
< CONFIG_PROVE_LOCKING=y
< # CONFIG_PROVE_RAW_LOCK_NESTING is not set
---

Quoted 1 line

# CONFIG_PROVE_LOCKING is not set

11164,11176c11121,11126
< CONFIG_DEBUG_RT_MUTEXES=y
< CONFIG_DEBUG_SPINLOCK=y
< CONFIG_DEBUG_MUTEXES=y
< CONFIG_DEBUG_WW_MUTEX_SLOWPATH=y
< CONFIG_DEBUG_RWSEMS=y
< CONFIG_DEBUG_LOCK_ALLOC=y
< CONFIG_LOCKDEP=y
< CONFIG_LOCKDEP_BITS=15
< CONFIG_LOCKDEP_CHAINS_BITS=16
< CONFIG_LOCKDEP_STACK_TRACE_BITS=19
< CONFIG_LOCKDEP_STACK_TRACE_HASH_BITS=14
< CONFIG_LOCKDEP_CIRCULAR_QUEUE_BITS=12
< # CONFIG_DEBUG_LOCKDEP is not set
---

Quoted 6 lines

# CONFIG_DEBUG_RT_MUTEXES is not set
# CONFIG_DEBUG_SPINLOCK is not set
# CONFIG_DEBUG_MUTEXES is not set
# CONFIG_DEBUG_WW_MUTEX_SLOWPATH is not set
# CONFIG_DEBUG_RWSEMS is not set
# CONFIG_DEBUG_LOCK_ALLOC is not set

11185,11186d11134
< CONFIG_TRACE_IRQFLAGS=y
< CONFIG_TRACE_IRQFLAGS_NMI=y
11192d11139
< # CONFIG_DEBUG_KOBJECT_RELEASE is not set
11208d11154
< CONFIG_PROVE_RCU=y
11248d11193
< CONFIG_PREEMPTIRQ_TRACEPOINTS=y
11327d11271
< # CONFIG_SAMPLE_KMEMLEAK is not set
11337d11280
< CONFIG_EARLY_PRINTK_USB=y
11339,11341c11282
< CONFIG_EARLY_PRINTK=y
< CONFIG_EARLY_PRINTK_DBGP=y
< CONFIG_EARLY_PRINTK_USB_XDBC=y
---

Quoted 1 line

# CONFIG_EARLY_PRINTK is not set

11347,11348c11288,11289
< # CONFIG_IO_DELAY_0X80 is not set
< CONFIG_IO_DELAY_0XED=y
---

Quoted 2 lines

CONFIG_IO_DELAY_0X80=y
# CONFIG_IO_DELAY_0XED is not set

11355,11358c11296,11300
< CONFIG_X86_DEBUG_FPU=y
< CONFIG_PUNIT_ATOM_DEBUG=m
< # CONFIG_UNWINDER_ORC is not set
< CONFIG_UNWINDER_FRAME_POINTER=y
---

Quoted 5 lines

# CONFIG_X86_DEBUG_FPU is not set
# CONFIG_PUNIT_ATOM_DEBUG is not set
CONFIG_UNWINDER_ORC=y
# CONFIG_UNWINDER_FRAME_POINTER is not set
# CONFIG_UNWINDER_GUESS is not set

#5 lore raw
Quoted 10 lines · Jeff Johnson
Quoted 3 lines · Jeff Johnson

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 have turned off most drivers here to get faster builds, but it's enough to get console output.
See https://pastebin.com/p2GFjAc3 for the full .config

Arnd

19a20

Quoted 1 line

CONFIG_CONSTRUCTORS=y

290a292

Quoted 1 line

CONFIG_GENERIC_CSUM=y

298a301

Quoted 1 line

CONFIG_KASAN_SHADOW_OFFSET=0xdffffc0000000000

394a398

Quoted 1 line

# CONFIG_ARCH_MEMORY_PROBE is not set

441c445
< CONFIG_RANDOMIZE_MEMORY_PHYSICAL_PADDING=0x0
---

Quoted 1 line

CONFIG_RANDOMIZE_MEMORY_PHYSICAL_PADDING=0xa

537a542

Quoted 1 line

# CONFIG_ACPI_HOTPLUG_MEMORY is not set

748d752
< CONFIG_HAVE_RELIABLE_STACKTRACE=y
903a908,909

Quoted 2 lines

CONFIG_NUMA_KEEP_MEMINFO=y
CONFIG_MEMORY_ISOLATION=y

906c912,916
< # CONFIG_MEMORY_HOTPLUG is not set
---

Quoted 5 lines

CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
CONFIG_MEMORY_HOTPLUG=y
# CONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE is not set
# CONFIG_MEMORY_HOTREMOVE is not set
CONFIG_MHP_MEMMAP_ON_MEMORY=y

914a925

Quoted 1 line

CONFIG_CONTIG_ALLOC=y

1238a1250,1251

Quoted 2 lines

# CONFIG_MOUSE_APPLETOUCH is not set
# CONFIG_MOUSE_BCM5974 is not set

1242a1256

Quoted 1 line

# CONFIG_MOUSE_SYNAPTICS_USB is not set

1264a1279,1280

Quoted 2 lines

# CONFIG_JOYSTICK_XPAD is not set
# CONFIG_JOYSTICK_PXRC is not set

1269a1286,1290

Quoted 5 lines

# CONFIG_TABLET_USB_ACECAD is not set
# CONFIG_TABLET_USB_AIPTEK is not set
# CONFIG_TABLET_USB_HANWANG is not set
# CONFIG_TABLET_USB_KBTAB is not set
# CONFIG_TABLET_USB_PEGASUS is not set

1313a1335

Quoted 1 line

# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set

1336a1359,1360

Quoted 2 lines

# CONFIG_INPUT_ATI_REMOTE2 is not set
# CONFIG_INPUT_KEYSPAN_REMOTE is not set

1337a1362,1364

Quoted 3 lines

# CONFIG_INPUT_POWERMATE is not set
# CONFIG_INPUT_YEALINK is not set
# CONFIG_INPUT_CM109 is not set

1922c1949,1970
< # CONFIG_USB_SUPPORT is not set
---

Quoted 17 lines

CONFIG_USB_SUPPORT=y
# CONFIG_USB_ULPI_BUS is not set
CONFIG_USB_ARCH_HAS_HCD=y
# CONFIG_USB is not set

#
# USB dual-mode controller drivers
#

#
# USB port drivers
#

#
# USB Physical Layer drivers
#
# CONFIG_NOP_USB_XCEIV is not set

Quoted 5 lines
# end of USB Physical Layer drivers

# CONFIG_USB_GADGET is not set
# CONFIG_TYPEC is not set
# CONFIG_USB_ROLE_SWITCH is not set

2243a2292

Quoted 1 line

# CONFIG_USB_LGM_PHY is not set

2829a2879

Quoted 1 line

CONFIG_STACKDEPOT_ALWAYS_INIT=y

2873a2924,2925

Quoted 2 lines

CONFIG_ARCH_WANT_FRAME_POINTERS=y
CONFIG_FRAME_POINTER=y

2874a2927

Quoted 1 line

# CONFIG_STACK_VALIDATION is not set

2896d2948
< # CONFIG_KCSAN is not set
2922c2974,2977
< # CONFIG_DEBUG_KMEMLEAK is not set
---

Quoted 4 lines

CONFIG_DEBUG_KMEMLEAK=y
CONFIG_DEBUG_KMEMLEAK_MEM_POOL_SIZE=16000
# CONFIG_DEBUG_KMEMLEAK_DEFAULT_OFF is not set
CONFIG_DEBUG_KMEMLEAK_AUTO_SCAN=y

2924c2979,2986
< # CONFIG_DEBUG_OBJECTS is not set
---

Quoted 8 lines

CONFIG_DEBUG_OBJECTS=y
# CONFIG_DEBUG_OBJECTS_SELFTEST is not set
# CONFIG_DEBUG_OBJECTS_FREE is not set
CONFIG_DEBUG_OBJECTS_TIMERS=y
CONFIG_DEBUG_OBJECTS_WORK=y
CONFIG_DEBUG_OBJECTS_RCU_HEAD=y
CONFIG_DEBUG_OBJECTS_PERCPU_COUNTER=y
CONFIG_DEBUG_OBJECTS_ENABLE_DEFAULT=1

2927c2989
< # CONFIG_SCHED_STACK_END_CHECK is not set
---

Quoted 1 line

CONFIG_SCHED_STACK_END_CHECK=y

2933a2996

Quoted 1 line

# CONFIG_MEMORY_NOTIFIER_ERROR_INJECT is not set

2943c3006,3014
< # CONFIG_KASAN is not set
---

Quoted 9 lines

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=y
# CONFIG_KASAN_MODULE_TEST is not set
# CONFIG_KASAN_EXTRA_INFO is not set

2945c3016,3020
< # CONFIG_KFENCE is not set
---

Quoted 5 lines

CONFIG_KFENCE=y
CONFIG_KFENCE_SAMPLE_INTERVAL=0
CONFIG_KFENCE_NUM_OBJECTS=255
# CONFIG_KFENCE_DEFERRABLE is not set
CONFIG_KFENCE_STRESS_TEST_FAULTS=0

2957c3032,3034
< # CONFIG_SOFTLOCKUP_DETECTOR is not set
---

Quoted 3 lines

CONFIG_LOCKUP_DETECTOR=y
CONFIG_SOFTLOCKUP_DETECTOR=y
# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set

2959c3036,3041
< # CONFIG_HARDLOCKUP_DETECTOR is not set
---

Quoted 6 lines

CONFIG_HARDLOCKUP_DETECTOR=y
# CONFIG_HARDLOCKUP_DETECTOR_PREFER_BUDDY is not set CONFIG_HARDLOCKUP_DETECTOR_PERF=y
# CONFIG_HARDLOCKUP_DETECTOR_BUDDY is not set # CONFIG_HARDLOCKUP_DETECTOR_ARCH is not set CONFIG_HARDLOCKUP_DETECTOR_COUNTS_HRTIMER=y

2961c3043,3046
< # CONFIG_DETECT_HUNG_TASK is not set
---

Quoted 4 lines

# CONFIG_BOOTPARAM_HARDLOCKUP_PANIC is not set
CONFIG_DETECT_HUNG_TASK=y
CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120
# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set

2970c3055
< # CONFIG_SCHED_DEBUG is not set
---

Quoted 1 line

CONFIG_SCHED_DEBUG=y

2982c3067,3068
< # CONFIG_PROVE_LOCKING is not set
---

Quoted 2 lines

CONFIG_PROVE_LOCKING=y
# CONFIG_PROVE_RAW_LOCK_NESTING is not set

2984,2989c3070,3082
< # CONFIG_DEBUG_RT_MUTEXES is not set
< # CONFIG_DEBUG_SPINLOCK is not set
< # CONFIG_DEBUG_MUTEXES is not set
< # CONFIG_DEBUG_WW_MUTEX_SLOWPATH is not set
< # CONFIG_DEBUG_RWSEMS is not set
< # CONFIG_DEBUG_LOCK_ALLOC is not set
---

Quoted 5 lines

CONFIG_DEBUG_RT_MUTEXES=y
CONFIG_DEBUG_SPINLOCK=y
CONFIG_DEBUG_MUTEXES=y
CONFIG_DEBUG_WW_MUTEX_SLOWPATH=y
CONFIG_DEBUG_RWSEMS=y

Quoted 8 lines

CONFIG_DEBUG_LOCK_ALLOC=y
CONFIG_LOCKDEP=y
CONFIG_LOCKDEP_BITS=15
CONFIG_LOCKDEP_CHAINS_BITS=16
CONFIG_LOCKDEP_STACK_TRACE_BITS=19
CONFIG_LOCKDEP_STACK_TRACE_HASH_BITS=14
CONFIG_LOCKDEP_CIRCULAR_QUEUE_BITS=12
# CONFIG_DEBUG_LOCKDEP is not set

2997a3091,3092

Quoted 2 lines

CONFIG_TRACE_IRQFLAGS=y
CONFIG_TRACE_IRQFLAGS_NMI=y

3002a3098

Quoted 1 line

# CONFIG_DEBUG_KOBJECT_RELEASE is not set

3016a3113

Quoted 1 line

CONFIG_PROVE_RCU=y

3051a3149

Quoted 1 line

CONFIG_PREEMPTIRQ_TRACEPOINTS=y

3104,3105c3202,3203
< CONFIG_IO_DELAY_0X80=y
< # CONFIG_IO_DELAY_0XED is not set
---

Quoted 2 lines

# CONFIG_IO_DELAY_0X80 is not set
CONFIG_IO_DELAY_0XED=y

3113,3114c3211,3212
< CONFIG_UNWINDER_ORC=y
< # CONFIG_UNWINDER_FRAME_POINTER is not set
---

Quoted 2 lines

# CONFIG_UNWINDER_ORC is not set
CONFIG_UNWINDER_FRAME_POINTER=y

3121c3219,3220
< # CONFIG_NOTIFIER_ERROR_INJECTION is not set
---

Quoted 2 lines

CONFIG_NOTIFIER_ERROR_INJECTION=m
CONFIG_PM_NOTIFIER_ERROR_INJECT=m

#6 lore raw
Quoted 10 lines · Arnd Bergmann
Quoted 9 lines · Jeff Johnson
Quoted 3 lines · Jeff Johnson

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.

Quoted 7 lines
Quoted 1 line

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

Quoted 1 line

CONFIG_CONSTRUCTORS=y

326a328

Quoted 1 line

CONFIG_GENERIC_CSUM=y

334a337

Quoted 1 line

CONFIG_KASAN_SHADOW_OFFSET=0xdffffc0000000000

856d858
< CONFIG_VMAP_STACK=y
10935a10938,10940

Quoted 3 lines

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
---

Quoted 2 lines

CONFIG_SLUB_DEBUG=y
# CONFIG_SLUB_DEBUG_ON is not set

11080c11085,11093
< # CONFIG_KASAN is not set
---

Quoted 9 lines

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

author
#7 lore raw
Quoted 23 lines · Jeff Johnson
Quoted 10 lines · Arnd Bergmann
Quoted 9 lines · Jeff Johnson
Quoted 3 lines · Jeff Johnson

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.

Quoted 7 lines
Quoted 1 line

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.

Quoted 6 lines

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

BTW there's also scripts/diffconfig which provides a prettier diff.

Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
#8 lore raw
In reply to Jeff Johnson
Quoted 6 lines · Jeff Johnson
Quoted 1 line · Arnd Bergmann

On Tue, Jul 9, 2024, at 05:55, Jeff Johnson wrote:

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.

Ok, good to know. I've added the KASAN developers to Cc now, maybe they have already seen reports of x86 kernels failing with gcc-14?

Quoted 3 lines

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 ...

Interesting, so the same config that works for me fails on your machine. I can see three possible reasons for this:

- qemu vs hardware -- Can you try running this kernel in qemu-system-x86_64 to see if that still boots

- kernel version -- it's possible that this is a known bug that was already fixed in the 6.10-rc7 kernel source I tried, or that your source tree has a new bug that I don't. Which version did you try?

- cross-compile vs native compile -- It's possible that my cross-built native x86_64 compiler has a bug that is not in natively built gcc binaries, or in the cross compiler I have on ARM. I've mostly ruled this one out by building the same kernel using the x86 compilers through qemu-user.

Arnd