All of lore.kernel.org
 help / color / mirror / Atom feed
* [REGRESSION][BISECTED] x86: kernel 6.12 crashes during get_xsave_addr_user on Apple Virtualization
@ 2025-03-11 14:35 Akihiro Suda
  2025-03-11 18:25 ` Aruna Ramakrishna
  2025-03-13 17:58 ` [REGRESSION][BISECTED] x86: kernel 6.12 crashes during get_xsave_addr_user " Dave Hansen
  0 siblings, 2 replies; 30+ messages in thread
From: Akihiro Suda @ 2025-03-11 14:35 UTC (permalink / raw)
  To: Linux Regressions, Linux x86, aruna.ramakrishna, tglx

When the kernel is compiled with CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS,
it no longer boots on Virtualization.framework [1] (Apple's equivalent of QEMU)
on Intel Macs, since the following commit:

    70044df250d0  x86/pkeys: Update PKRU to enable all pkeys before XSAVE

Tested with macOS 13.5.1, running on MacBook Pro 2020 with
Intel(R) Core(TM) i7-1068NG7 CPU @ 2.30GHz.

The issue doesn't seem to happen with QEMU + Hypervisor.framework (Apple's KVM).

This issue was originally reported by Blake Garner in Lima [2]'s Slack channel.

[1] https://developer.apple.com/documentation/virtualization/running-linux-in-a-virtual-machine
[2] https://lima-vm.io/

---
#regzbot link: https://github.com/lima-vm/lima/issues/3334
#regzbot introduced: 70044df250d022572e26cd301bddf75eac1fe50e
#regzbot title: x86/pkeys: Update PKRU to enable all pkeys before XSAVE
---

A boot log with the regression commit, with defconfig:

$ LinuxVirtualMachine bzImage-g70044df250d0 initrd
(...)
[    0.477064] Run /init as init process
[    0.478585] ------------[ cut here ]------------
[    0.478747] WARNING: CPU: 0 PID: 1 at
arch/x86/kernel/fpu/xstate.c:1003 get_xsave_addr_user+0x28/0x40
[    0.478893] Modules linked in:
[    0.478999] CPU: 0 UID: 0 PID: 1 Comm: init Not tainted
6.11.0-rc1-00007-g70044df250d0 #15
[    0.479148] RIP: 0010:get_xsave_addr_user+0x28/0x40
[    0.479454] Code: 90 90 66 0f 1f 00 48 63 ce ba 01 00 00 00 48 d3
e2 48 23 15 12 36 7e 01 74 0f 8b 04 8d 00 55 22 a8 48 01 f8 c3 cc cc
cc cc 90 <0f> 0b 90 31 c0 c3 cc cc cc cc 66 66 2e 0f 1f 84 00 00 00 00
00 0f
[    0.479699] RSP: 0018:ffff95af4000fd80 EFLAGS: 00010246
[    0.479983] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000009
[    0.480137] RDX: 0000000000000000 RSI: 0000000000000009 RDI: 00007ffe7b10bf80
[    0.480301] RBP: 00007ffe7b10bf80 R08: ffff95af4000fe90 R09: 0000000000000000
[    0.480431] R10: 0000000000000001 R11: 0000000000000010 R12: ffff930081198c40
[    0.480820] R13: 00007ffe7b10bf80 R14: ffff930081198c00 R15: ffff930081198000
[    0.481112] FS:  00007ff310710740(0000) GS:ffff9300fdc00000(0000)
knlGS:0000000000000000
[    0.481261] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    0.481415] CR2: 00007ffe7b10bf80 CR3: 00000000011f0004 CR4: 0000000000770ef0
[    0.481552] PKRU: 55555554
[    0.481660] Call Trace:
[    0.481726]  <TASK>
[    0.481798]  ? get_xsave_addr_user+0x28/0x40
[    0.481923]  ? __warn.cold+0x8e/0xea
[    0.482122]  ? get_xsave_addr_user+0x28/0x40
[    0.482212]  ? report_bug+0xff/0x140
[    0.482316]  ? handle_bug+0x3b/0x70
[    0.482408]  ? exc_invalid_op+0x17/0x70
[    0.482540]  ? asm_exc_invalid_op+0x1a/0x20
[    0.482609]  ? get_xsave_addr_user+0x28/0x40
[    0.482732]  copy_fpstate_to_sigframe+0x1be/0x380
[    0.482801]  ? __put_user_8+0x11/0x20
[    0.482869]  get_sigframe+0xf1/0x280
[    0.482957]  x64_setup_rt_frame+0x67/0x2c0
[    0.483057]  arch_do_signal_or_restart+0x1b3/0x240
[    0.483140]  syscall_exit_to_user_mode+0xb0/0x130
[    0.483215]  do_syscall_64+0xab/0x1a0
[    0.483270]  entry_SYSCALL_64_after_hwframe+0x77/0x7f
[    0.483343] RIP: 0033:0x7ff3107b2046
[    0.483405] Code: 00 00 48 8b 15 b3 1d 17 00 64 89 02 48 c7 c2 ff
ff ff ff 48 8b 5d f8 c9 48 89 d0 c3 0f 1f 84 00 00 00 00 00 48 8b 45
10 0f 05 <48> 63 d0 3d 00 f0 ff ff 77 10 48 8b 5d f8 48 89 d0 c9 c3 0f
1f 80
[    0.483666] RSP: 002b:00007ffe7b10cab0 EFLAGS: 00000202 ORIG_RAX:
000000000000003d
[    0.483774] RAX: 0000000000000035 RBX: 00007ff310710740 RCX: 00007ff3107b2046
[    0.483876] RDX: 0000000000000000 RSI: 00007ffe7b10cb0c RDI: ffffffffffffffff
[    0.483976] RBP: 00007ffe7b10cac0 R08: 0000000000000000 R09: 0000000000000000
[    0.484078] R10: 0000000000000000 R11: 0000000000000202 R12: 00007ffe7b10cb10
[    0.484178] R13: 00005561f9af12a0 R14: 00005561f9af2600 R15: 0000000000000001
[    0.484280]  </TASK>
[    0.484318] ---[ end trace 0000000000000000 ]---

(kernel hangs here)

^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2025-03-20 19:46 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-11 14:35 [REGRESSION][BISECTED] x86: kernel 6.12 crashes during get_xsave_addr_user on Apple Virtualization Akihiro Suda
2025-03-11 18:25 ` Aruna Ramakrishna
2025-03-12  5:57   ` Akihiro Suda
2025-03-12  6:18     ` Akihiro Suda
2025-03-12  9:31       ` [PATCH] x86: disable PKU when running " Akihiro Suda
2025-03-12  9:32       ` Akihiro Suda
2025-03-12 10:09       ` [PATCH v2] " Akihiro Suda
2025-03-12 10:21         ` Greg KH
2025-03-13 17:02         ` Ingo Molnar
2025-03-13 23:59           ` Akihiro Suda
2025-03-13 17:11         ` [tip: x86/urgent] x86/pkeys: Disable " tip-bot2 for Akihiro Suda
2025-03-14  6:26         ` [PATCH v2] x86: disable " kernel test robot
2025-03-14  6:26         ` kernel test robot
2025-03-13 17:58 ` [REGRESSION][BISECTED] x86: kernel 6.12 crashes during get_xsave_addr_user " Dave Hansen
2025-03-13 18:01   ` Ingo Molnar
2025-03-14  6:22   ` Akihiro Suda
2025-03-14  8:48     ` [PATCH] x86/pkeys: Disable PKU when XFEATURE_PKRU is missing Akihiro Suda
2025-03-14  8:49       ` kernel test robot
2025-03-19 21:00       ` [tip: x86/urgent] x86/pkeys: Add quirk to disable " tip-bot2 for Akihiro Suda
2025-03-19 21:39       ` [PATCH] x86/pkeys: Disable " Ingo Molnar
2025-03-20 14:21         ` Akihiro Suda
2025-03-20 15:11         ` Borislav Petkov
2025-03-20 19:46           ` Ingo Molnar
2025-03-19 22:11       ` [tip: x86/urgent] x86/pkeys: Add quirk to disable " tip-bot2 for Akihiro Suda
2025-03-14 15:07     ` [REGRESSION][BISECTED] x86: kernel 6.12 crashes during get_xsave_addr_user on Apple Virtualization Dave Hansen
2025-03-15 13:09       ` Akihiro Suda
2025-03-15 13:48         ` Borislav Petkov
2025-03-15 15:10           ` Akihiro Suda
2025-03-15 19:02             ` Borislav Petkov
2025-03-15 18:45         ` Dave Hansen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.