Re: [CRASH][BISECTED] 6.4.1 crash in boot

From: Mirsad Todorovac
Date: Tue Jul 04 2023 - 13:20:27 EST


On 7/4/23 01:09, Kees Cook wrote:> On Mon, Jul 03, 2023 at 12:03:23PM -0700, Kees Cook wrote:
Cool. xhci-hub is in your backtrace, and the above patch was made for
something very similar (though, again, I don't see why you're getting a
_crash_, it should _warn_ and continue normally). And, actually, also
include this patch:
https://lore.kernel.org/lkml/20230614181307.gonna.256-kees@xxxxxxxxxx/

This is now in Linus's tree:
09b69dd4378b ("usb: ch9: Replace 1-element array with flexible array")

Please also still try with the first patch I mentioned, which is very similar:
https://lore.kernel.org/lkml/20230629190900.never.787-kees@xxxxxxxxxx/

Hi,

I have finally built w both patches (and recommended PSTORE settings were
default already).

This second patch fixes the booting problem, but alas there is still a problem -
all Wayland and X11.org GUI applications fail to start, with errors like this one:

Jul 4 19:09:07 defiant kernel: [ 40.529719] invalid opcode: 0000 [#1] PREEMPT SMP NOPTI
Jul 4 19:09:07 defiant kernel: [ 40.529723] CPU: 0 PID: 3492 Comm: thunderbird Not tainted 6.4.0-rc2-crash2-kees2-00001-g2d47c6956ab3-dirty #5
Jul 4 19:09:07 defiant kernel: [ 40.529725] Hardware name: ASRock X670E PG Lightning/X670E PG Lightning, BIOS 1.21 04/26/2023
Jul 4 19:09:07 defiant kernel: [ 40.529726] RIP: 0010:alloc_pid+0x46c/0x480
Jul 4 19:09:07 defiant kernel: [ 40.529730] Code: 00 92 49 c7 c4 f4 ff ff ff e8 50 bc 15 01 4c 89 ff e8 68 50 13 00 e9 ec fd ff ff be 02 00 00 00 e8 89 5f 71 00 e9 f8 fe ff ff <0f> 0b 49 c7 c4 f4 ff ff ff e9 b9 fb ff ff 66 0f 1f 44 00 00 90 90
Jul 4 19:09:07 defiant kernel: [ 40.529731] RSP: 0018:ffffad8c45313c48 EFLAGS: 00010202
Jul 4 19:09:07 defiant kernel: [ 40.529733] RAX: 0000000080000000 RBX: 0000000000000001 RCX: 0000000000000000
Jul 4 19:09:07 defiant kernel: [ 40.529734] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
Jul 4 19:09:07 defiant kernel: [ 40.529734] RBP: ffffad8c45313c98 R08: 0000000000000000 R09: 0000000000000000
Jul 4 19:09:07 defiant kernel: [ 40.529735] R10: 0000000000000000 R11: 0000000000000000 R12: ffff9cbdff1c63a8
Jul 4 19:09:07 defiant kernel: [ 40.529735] R13: ffff9cbde9b08750 R14: 0000000000000001 R15: ffff9cbdff1c63a8
Jul 4 19:09:07 defiant kernel: [ 40.529736] FS: 00007f50d863e780(0000) GS:ffff9ccc97a00000(0000) knlGS:0000000000000000
Jul 4 19:09:07 defiant kernel: [ 40.529737] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Jul 4 19:09:07 defiant kernel: [ 40.529737] CR2: 0000000000000000 CR3: 00000001b0ae0000 CR4: 0000000000750ef0
Jul 4 19:09:07 defiant kernel: [ 40.529738] PKRU: 55555554
Jul 4 19:09:07 defiant kernel: [ 40.529739] Call Trace:
Jul 4 19:09:07 defiant kernel: [ 40.529739] <TASK>
Jul 4 19:09:07 defiant kernel: [ 40.529741] copy_process+0x165f/0x2110
Jul 4 19:09:07 defiant kernel: [ 40.529744] kernel_clone+0x9d/0x3a0
Jul 4 19:09:07 defiant kernel: [ 40.529745] ? find_held_lock+0x31/0xa0
Jul 4 19:09:07 defiant kernel: [ 40.529747] ? mntput_no_expire+0x89/0x4f0
Jul 4 19:09:07 defiant kernel: [ 40.529749] ? lock_release+0xc4/0x270
Jul 4 19:09:07 defiant kernel: [ 40.529751] __do_sys_clone+0x66/0xa0
Jul 4 19:09:07 defiant kernel: [ 40.529754] __x64_sys_clone+0x25/0x40
Jul 4 19:09:07 defiant kernel: [ 40.529755] do_syscall_64+0x59/0x90
Jul 4 19:09:07 defiant kernel: [ 40.529758] ? syscall_exit_to_user_mode+0x39/0x60
Jul 4 19:09:07 defiant kernel: [ 40.529760] ? do_syscall_64+0x69/0x90
Jul 4 19:09:07 defiant kernel: [ 40.529761] ? irqentry_exit_to_user_mode+0x27/0x40
Jul 4 19:09:07 defiant kernel: [ 40.529762] ? irqentry_exit+0x77/0xb0
Jul 4 19:09:07 defiant kernel: [ 40.529764] ? exc_page_fault+0xae/0x240
Jul 4 19:09:07 defiant kernel: [ 40.529765] entry_SYSCALL_64_after_hwframe+0x72/0xdc
Jul 4 19:09:07 defiant kernel: [ 40.529767] RIP: 0033:0x7f50d811ea3d
Jul 4 19:09:07 defiant kernel: [ 40.529769] Code: 5b 41 5c c3 66 0f 1f 84 00 00 00 00 00 f3 0f 1e fa 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d c3 a3 0f 00 f7 d8 64 89 01 48
Jul 4 19:09:07 defiant kernel: [ 40.529770] RSP: 002b:00007ffcc449ce58 EFLAGS: 00000246 ORIG_RAX: 0000000000000038
Jul 4 19:09:07 defiant kernel: [ 40.529771] RAX: ffffffffffffffda RBX: 0000000000000051 RCX: 00007f50d811ea3d
Jul 4 19:09:07 defiant kernel: [ 40.529771] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000030000011
Jul 4 19:09:07 defiant kernel: [ 40.529772] RBP: 0000000000000001 R08: 0000000000000000 R09: 00007f50d82b97c0
Jul 4 19:09:07 defiant kernel: [ 40.529772] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000011
Jul 4 19:09:07 defiant kernel: [ 40.529773] R13: 00007f50d7e16980 R14: 00007f50d863e6c0 R15: 00007f50d82ba3c0
Jul 4 19:09:07 defiant kernel: [ 40.529775] </TASK>
Jul 4 19:09:07 defiant kernel: [ 40.529776] Modules linked in: binfmt_misc f2fs crc32_generic lz4hc_compress lz4_compress nls_iso8859_1 intel_rapl_msr intel_rapl_common snd_hda_codec_realtek snd_hda_codec_generic ledtrig_audio snd_hda_codec_hdmi edac_mce_amd crct10dif_pclmul snd_hda_intel polyval_clmulni snd_intel_dspcfg polyval_generic ghash_clmulni_intel snd_intel_sdw_acpi snd_seq_midi sha512_ssse3 snd_seq_midi_event snd_hda_codec aesni_intel snd_hda_core crypto_simd cryptd snd_hwdep joydev input_leds snd_rawmidi rapl amdgpu snd_pcm ccp wmi_bmof snd_seq k10temp snd_seq_device iommu_v2 snd_timer drm_buddy gpu_sched drm_suballoc_helper drm_ttm_helper ttm drm_display_helper cec snd drm_kms_helper i2c_algo_bit syscopyarea sysfillrect sysimgblt soundcore mac_hid sch_fq_codel msr parport_pc ppdev lp parport ramoops pstore_blk reed_solomon pstore_zone fuse efi_pstore drm ip_tables x_tables autofs4 btrfs blake2b_generic xor raid6_pq hid_generic nvme nvme_core ahci xhci_pci i2c_piix4 crc32_pclmul nvme_common libahci xhci_pci_renesas r8169 realtek video wmi
Jul 4 19:09:07 defiant kernel: [ 40.529799] gpio_amdpt
Jul 4 19:09:07 defiant kernel: [ 40.529801] ---[ end trace 0000000000000000 ]---
Jul 4 19:09:07 defiant kernel: [ 40.865489] RIP: 0010:alloc_pid+0x46c/0x480
Jul 4 19:09:07 defiant kernel: [ 40.865491] Code: 00 92 49 c7 c4 f4 ff ff ff e8 50 bc 15 01 4c 89 ff e8 68 50 13 00 e9 ec fd ff ff be 02 00 00 00 e8 89 5f 71 00 e9 f8 fe ff ff <0f> 0b 49 c7 c4 f4 ff ff ff e9 b9 fb ff ff 66 0f 1f 44 00 00 90 90
Jul 4 19:09:07 defiant kernel: [ 40.865492] RSP: 0018:ffffad8c45313c48 EFLAGS: 00010202
Jul 4 19:09:07 defiant kernel: [ 40.865494] RAX: 0000000080000000 RBX: 0000000000000001 RCX: 0000000000000000
Jul 4 19:09:07 defiant kernel: [ 40.865495] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
Jul 4 19:09:07 defiant kernel: [ 40.865495] RBP: ffffad8c45313c98 R08: 0000000000000000 R09: 0000000000000000
Jul 4 19:09:07 defiant kernel: [ 40.865496] R10: 0000000000000000 R11: 0000000000000000 R12: ffff9cbdff1c63a8
Jul 4 19:09:07 defiant kernel: [ 40.865497] R13: ffff9cbde9b08750 R14: 0000000000000001 R15: ffff9cbdff1c63a8
Jul 4 19:09:07 defiant kernel: [ 40.865497] FS: 00007f50d863e780(0000) GS:ffff9ccc97a00000(0000) knlGS:0000000000000000
Jul 4 19:09:07 defiant kernel: [ 40.865498] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Jul 4 19:09:07 defiant kernel: [ 40.865499] CR2: 0000000000000000 CR3: 00000001b0ae0000 CR4: 0000000000750ef0
Jul 4 19:09:07 defiant kernel: [ 40.865500] PKRU: 55555554

The interpretation of these findings is beyond the scope of my knowledge.

I hope you can make any use of them.

Best regards,
Mirsad Todorovac