Re: [PATCH] x86/fpu: XRSTOR is expected to raise #GP

2018-11-28 Thread Sebastian Andrzej Siewior
On 2018-11-28 15:27:28 [+], David Laight wrote: > Better still note it in the code. I'm in favour of adding something to tools/testing/selftests/x86/. > David Sebastian

Re: [PATCH] x86/fpu: XRSTOR is expected to raise #GP

2018-11-28 Thread Sebastian Andrzej Siewior
On 2018-11-28 15:27:28 [+], David Laight wrote: > Better still note it in the code. I'm in favour of adding something to tools/testing/selftests/x86/. > David Sebastian

RE: [PATCH] x86/fpu: XRSTOR is expected to raise #GP

2018-11-28 Thread David Laight
From: H. Peter Anvin > Sent: 26 November 2018 19:50 > On 11/26/18 9:49 AM, Sebastian Andrzej Siewior wrote: > > On 2018-11-26 18:27:06 [+0100], Jann Horn wrote: > >> commit 75045f77f7a7 ("x86/extable: Introduce _ASM_EXTABLE_UA for uaccess > >> fixups") incorrectly replaced the fixup entry for

RE: [PATCH] x86/fpu: XRSTOR is expected to raise #GP

2018-11-28 Thread David Laight
From: H. Peter Anvin > Sent: 26 November 2018 19:50 > On 11/26/18 9:49 AM, Sebastian Andrzej Siewior wrote: > > On 2018-11-26 18:27:06 [+0100], Jann Horn wrote: > >> commit 75045f77f7a7 ("x86/extable: Introduce _ASM_EXTABLE_UA for uaccess > >> fixups") incorrectly replaced the fixup entry for

Re: [PATCH] x86/fpu: XRSTOR is expected to raise #GP

2018-11-26 Thread H. Peter Anvin
On 11/26/18 9:49 AM, Sebastian Andrzej Siewior wrote: > On 2018-11-26 18:27:06 [+0100], Jann Horn wrote: >> commit 75045f77f7a7 ("x86/extable: Introduce _ASM_EXTABLE_UA for uaccess >> fixups") incorrectly replaced the fixup entry for XSTATE_OP with a >> user-#PF-only fixup. However, XRSTOR can

Re: [PATCH] x86/fpu: XRSTOR is expected to raise #GP

2018-11-26 Thread H. Peter Anvin
On 11/26/18 9:49 AM, Sebastian Andrzej Siewior wrote: > On 2018-11-26 18:27:06 [+0100], Jann Horn wrote: >> commit 75045f77f7a7 ("x86/extable: Introduce _ASM_EXTABLE_UA for uaccess >> fixups") incorrectly replaced the fixup entry for XSTATE_OP with a >> user-#PF-only fixup. However, XRSTOR can

Re: [PATCH] x86/fpu: XRSTOR is expected to raise #GP

2018-11-26 Thread Sebastian Andrzej Siewior
On 2018-11-26 18:27:06 [+0100], Jann Horn wrote: > commit 75045f77f7a7 ("x86/extable: Introduce _ASM_EXTABLE_UA for uaccess > fixups") incorrectly replaced the fixup entry for XSTATE_OP with a > user-#PF-only fixup. However, XRSTOR can also raise #GP when the supplied > address points to userspace

Re: [PATCH] x86/fpu: XRSTOR is expected to raise #GP

2018-11-26 Thread Sebastian Andrzej Siewior
On 2018-11-26 18:27:06 [+0100], Jann Horn wrote: > commit 75045f77f7a7 ("x86/extable: Introduce _ASM_EXTABLE_UA for uaccess > fixups") incorrectly replaced the fixup entry for XSTATE_OP with a > user-#PF-only fixup. However, XRSTOR can also raise #GP when the supplied > address points to userspace

[PATCH] x86/fpu: XRSTOR is expected to raise #GP

2018-11-26 Thread Jann Horn
commit 75045f77f7a7 ("x86/extable: Introduce _ASM_EXTABLE_UA for uaccess fixups") incorrectly replaced the fixup entry for XSTATE_OP with a user-#PF-only fixup. However, XRSTOR can also raise #GP when the supplied address points to userspace memory. Change it back. Reported-by: Sebastian Andrzej

[PATCH] x86/fpu: XRSTOR is expected to raise #GP

2018-11-26 Thread Jann Horn
commit 75045f77f7a7 ("x86/extable: Introduce _ASM_EXTABLE_UA for uaccess fixups") incorrectly replaced the fixup entry for XSTATE_OP with a user-#PF-only fixup. However, XRSTOR can also raise #GP when the supplied address points to userspace memory. Change it back. Reported-by: Sebastian Andrzej