* crosstool: x86 kernel compiled with GCC 14.1 fails to boot
@ 2024-07-08 18:16 Kalle Valo
2024-07-08 19:03 ` Arnd Bergmann
2024-07-09 1:57 ` Jeff Johnson
0 siblings, 2 replies; 9+ messages in thread
From: Kalle Valo @ 2024-07-08 18:16 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: linux-kernel, ath12k
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: crosstool: x86 kernel compiled with GCC 14.1 fails to boot
2024-07-08 18:16 crosstool: x86 kernel compiled with GCC 14.1 fails to boot Kalle Valo
@ 2024-07-08 19:03 ` Arnd Bergmann
2024-07-08 21:39 ` Genes Lists
2024-07-09 1:57 ` Jeff Johnson
1 sibling, 1 reply; 9+ messages in thread
From: Arnd Bergmann @ 2024-07-08 19:03 UTC (permalink / raw)
To: Kalle Valo; +Cc: linux-kernel, ath12k
On Mon, Jul 8, 2024, at 20:16, Kalle Valo wrote:
> 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?
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: crosstool: x86 kernel compiled with GCC 14.1 fails to boot
2024-07-08 19:03 ` Arnd Bergmann
@ 2024-07-08 21:39 ` Genes Lists
0 siblings, 0 replies; 9+ messages in thread
From: Genes Lists @ 2024-07-08 21:39 UTC (permalink / raw)
To: Arnd Bergmann, Kalle Valo; +Cc: linux-kernel, ath12k
[-- Attachment #1: Type: text/plain, Size: 918 bytes --]
On Mon, 2024-07-08 at 21:03 +0200, Arnd Bergmann wrote:
> On Mon, Jul 8, 2024, at 20:16, Kalle Valo wrote:
> > 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
...
>
>
> Thanks for the report. Unfortunately I have no idea what the
> problem may be, and so far nobody else has reported this.
>
...
> 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
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: crosstool: x86 kernel compiled with GCC 14.1 fails to boot
2024-07-08 18:16 crosstool: x86 kernel compiled with GCC 14.1 fails to boot Kalle Valo
2024-07-08 19:03 ` Arnd Bergmann
@ 2024-07-09 1:57 ` Jeff Johnson
2024-07-09 3:55 ` Jeff Johnson
1 sibling, 1 reply; 9+ messages in thread
From: Jeff Johnson @ 2024-07-09 1:57 UTC (permalink / raw)
To: Kalle Valo, Arnd Bergmann; +Cc: linux-kernel, ath12k
On 7/8/2024 11:16 AM, Kalle Valo wrote:
> 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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: crosstool: x86 kernel compiled with GCC 14.1 fails to boot
2024-07-09 1:57 ` Jeff Johnson
@ 2024-07-09 3:55 ` Jeff Johnson
2024-07-09 5:44 ` Arnd Bergmann
0 siblings, 1 reply; 9+ messages in thread
From: Jeff Johnson @ 2024-07-09 3:55 UTC (permalink / raw)
To: Kalle Valo, Arnd Bergmann; +Cc: linux-kernel, ath12k
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:
20d19
< CONFIG_CONSTRUCTORS=y
328d326
< CONFIG_GENERIC_CSUM=y
337d334
< CONFIG_KASAN_SHADOW_OFFSET=0xdffffc0000000000
858a856
> 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
> # CONFIG_KCSAN is not set
11056,11057c11049
< CONFIG_SLUB_DEBUG=y
< # CONFIG_SLUB_DEBUG_ON is not set
---
> # CONFIG_SLUB_DEBUG is not set
11060c11052
< CONFIG_PAGE_POISONING=y
---
> # CONFIG_PAGE_POISONING is not set
11064c11056
< CONFIG_DEBUG_WX=y
---
> # 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
---
> # 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
---
> # CONFIG_DEBUG_OBJECTS is not set
11084c11065
< CONFIG_SCHED_STACK_END_CHECK=y
---
> # CONFIG_SCHED_STACK_END_CHECK is not set
11091c11072
< CONFIG_MEMORY_NOTIFIER_ERROR_INJECT=m
---
> # 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
---
> # 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
---
> # CONFIG_KFENCE is not set
11126,11128c11094
< CONFIG_LOCKUP_DETECTOR=y
< CONFIG_SOFTLOCKUP_DETECTOR=y
< # CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
---
> # 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
---
> # 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
---
> # CONFIG_DETECT_HUNG_TASK is not set
11149c11107
< CONFIG_SCHED_DEBUG=y
---
> # CONFIG_SCHED_DEBUG is not set
11151c11109
< CONFIG_SCHEDSTATS=y
---
> # CONFIG_SCHEDSTATS is not set
11161,11162c11119
< CONFIG_PROVE_LOCKING=y
< # CONFIG_PROVE_RAW_LOCK_NESTING is not set
---
> # 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
---
> # 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
---
> # CONFIG_EARLY_PRINTK is not set
11347,11348c11288,11289
< # CONFIG_IO_DELAY_0X80 is not set
< CONFIG_IO_DELAY_0XED=y
---
> 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
---
> # 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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: crosstool: x86 kernel compiled with GCC 14.1 fails to boot
2024-07-09 3:55 ` Jeff Johnson
@ 2024-07-09 5:44 ` Arnd Bergmann
2024-07-09 15:29 ` Jeff Johnson
0 siblings, 1 reply; 9+ messages in thread
From: Arnd Bergmann @ 2024-07-09 5:44 UTC (permalink / raw)
To: Jeff Johnson, Kalle Valo; +Cc: linux-kernel, ath12k
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 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
> CONFIG_CONSTRUCTORS=y
290a292
> CONFIG_GENERIC_CSUM=y
298a301
> CONFIG_KASAN_SHADOW_OFFSET=0xdffffc0000000000
394a398
> # CONFIG_ARCH_MEMORY_PROBE is not set
441c445
< CONFIG_RANDOMIZE_MEMORY_PHYSICAL_PADDING=0x0
---
> CONFIG_RANDOMIZE_MEMORY_PHYSICAL_PADDING=0xa
537a542
> # CONFIG_ACPI_HOTPLUG_MEMORY is not set
748d752
< CONFIG_HAVE_RELIABLE_STACKTRACE=y
903a908,909
> CONFIG_NUMA_KEEP_MEMINFO=y
> CONFIG_MEMORY_ISOLATION=y
906c912,916
< # CONFIG_MEMORY_HOTPLUG is not set
---
> 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
> CONFIG_CONTIG_ALLOC=y
1238a1250,1251
> # CONFIG_MOUSE_APPLETOUCH is not set
> # CONFIG_MOUSE_BCM5974 is not set
1242a1256
> # CONFIG_MOUSE_SYNAPTICS_USB is not set
1264a1279,1280
> # CONFIG_JOYSTICK_XPAD is not set
> # CONFIG_JOYSTICK_PXRC is not set
1269a1286,1290
> # 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
> # CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
1336a1359,1360
> # CONFIG_INPUT_ATI_REMOTE2 is not set
> # CONFIG_INPUT_KEYSPAN_REMOTE is not set
1337a1362,1364
> # 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
---
> 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
> # 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
> # CONFIG_USB_LGM_PHY is not set
2829a2879
> CONFIG_STACKDEPOT_ALWAYS_INIT=y
2873a2924,2925
> CONFIG_ARCH_WANT_FRAME_POINTERS=y
> CONFIG_FRAME_POINTER=y
2874a2927
> # CONFIG_STACK_VALIDATION is not set
2896d2948
< # CONFIG_KCSAN is not set
2922c2974,2977
< # CONFIG_DEBUG_KMEMLEAK is not set
---
> 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
---
> 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
---
> CONFIG_SCHED_STACK_END_CHECK=y
2933a2996
> # CONFIG_MEMORY_NOTIFIER_ERROR_INJECT is not set
2943c3006,3014
< # 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=y
> # CONFIG_KASAN_MODULE_TEST is not set
> # CONFIG_KASAN_EXTRA_INFO is not set
2945c3016,3020
< # CONFIG_KFENCE is not set
---
> 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
---
> CONFIG_LOCKUP_DETECTOR=y
> CONFIG_SOFTLOCKUP_DETECTOR=y
> # CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
2959c3036,3041
< # CONFIG_HARDLOCKUP_DETECTOR is not set
---
> 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
---
> # 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
---
> CONFIG_SCHED_DEBUG=y
2982c3067,3068
< # CONFIG_PROVE_LOCKING is not set
---
> 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
---
> 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
2997a3091,3092
> CONFIG_TRACE_IRQFLAGS=y
> CONFIG_TRACE_IRQFLAGS_NMI=y
3002a3098
> # CONFIG_DEBUG_KOBJECT_RELEASE is not set
3016a3113
> CONFIG_PROVE_RCU=y
3051a3149
> CONFIG_PREEMPTIRQ_TRACEPOINTS=y
3104,3105c3202,3203
< CONFIG_IO_DELAY_0X80=y
< # CONFIG_IO_DELAY_0XED is not set
---
> # 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
---
> # CONFIG_UNWINDER_ORC is not set
> CONFIG_UNWINDER_FRAME_POINTER=y
3121c3219,3220
< # CONFIG_NOTIFIER_ERROR_INJECTION is not set
---
> CONFIG_NOTIFIER_ERROR_INJECTION=m
> CONFIG_PM_NOTIFIER_ERROR_INJECT=m
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: crosstool: x86 kernel compiled with GCC 14.1 fails to boot
2024-07-09 5:44 ` Arnd Bergmann
@ 2024-07-09 15:29 ` Jeff Johnson
2024-07-09 16:18 ` Kalle Valo
2024-07-09 19:33 ` Arnd Bergmann
0 siblings, 2 replies; 9+ messages in thread
From: Jeff Johnson @ 2024-07-09 15:29 UTC (permalink / raw)
To: Arnd Bergmann, Kalle Valo; +Cc: linux-kernel, ath12k
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: crosstool: x86 kernel compiled with GCC 14.1 fails to boot
2024-07-09 15:29 ` Jeff Johnson
@ 2024-07-09 16:18 ` Kalle Valo
2024-07-09 19:33 ` Arnd Bergmann
1 sibling, 0 replies; 9+ messages in thread
From: Kalle Valo @ 2024-07-09 16:18 UTC (permalink / raw)
To: Jeff Johnson; +Cc: Arnd Bergmann, linux-kernel, ath12k
Jeff Johnson <quic_jjohnson@quicinc.com> writes:
> 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
BTW there's also scripts/diffconfig which provides a prettier diff.
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: crosstool: x86 kernel compiled with GCC 14.1 fails to boot
2024-07-09 15:29 ` Jeff Johnson
2024-07-09 16:18 ` Kalle Valo
@ 2024-07-09 19:33 ` Arnd Bergmann
1 sibling, 0 replies; 9+ messages in thread
From: Arnd Bergmann @ 2024-07-09 19:33 UTC (permalink / raw)
To: Jeff Johnson, Kalle Valo
Cc: linux-kernel, ath12k, kasan-dev, Andrey Ryabinin,
Alexander Potapenko, Andrey Konovalov, Dmitry Vyukov,
Vincenzo Frascino
On Tue, Jul 9, 2024, at 17:29, Jeff Johnson wrote:
> On 7/8/2024 10:44 PM, Arnd Bergmann wrote:
>> 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?
> 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
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2024-07-09 19:33 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-08 18:16 crosstool: x86 kernel compiled with GCC 14.1 fails to boot Kalle Valo
2024-07-08 19:03 ` Arnd Bergmann
2024-07-08 21:39 ` Genes Lists
2024-07-09 1:57 ` Jeff Johnson
2024-07-09 3:55 ` Jeff Johnson
2024-07-09 5:44 ` Arnd Bergmann
2024-07-09 15:29 ` Jeff Johnson
2024-07-09 16:18 ` Kalle Valo
2024-07-09 19:33 ` Arnd Bergmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).