On Sun, May 30 2021 at 16:41, Andy Lutomirski wrote:
On 5/30/21 3:02 PM, Thomas Gleixner wrote:
/*
- Clear the FPU state back to init state.
- Called by sys_execve(), by the signal handler code and by various
- error paths.
- Reset current's user FPU states to the init states. The caller promises
- that current's supervisor states (in memory or CPU regs as appropriate)
- as well as the XSAVE header in memory are intact.
^^^ The caller promises this
Yes, I misread this, but it's more than non-obvious.
This patch fixes your reproducer and my (to-be-sent) reproducer. I tested it on a machine that physically has the XRSTORS instruction but I disabled it using virt. Are you still seeing failures with this patch applied? I can try to test on a different CPU.
Seems I applied the patch, built it and then failed to actually boot that kernel. I retested with brain awake and it indeed works.
Sorry for the rant!
Thanks,
tglx