linux-stable/arch/x86/include/asm/fpu
Thomas Gleixner aee8c67a4f x86/fpu: Return proper error codes from user access functions
When *RSTOR from user memory raises an exception, there is no way to
differentiate them. That's bad because it forces the slow path even when
the failure was not a fault. If the operation raised eg. #GP then going
through the slow path is pointless.

Use _ASM_EXTABLE_FAULT() which stores the trap number and let the exception
fixup return the negated trap number as error.

This allows to separate the fast path and let it handle faults directly and
avoid the slow path for all other exceptions.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/20210623121457.601480369@linutronix.de
2021-06-23 20:04:58 +02:00
..
api.h x86/cpufeatures: Force disable X86_FEATURE_ENQCMD and remove update_pasid() 2021-06-03 16:33:09 +02:00
internal.h x86/fpu: Return proper error codes from user access functions 2021-06-23 20:04:58 +02:00
regset.h x86: switch to ->regset_get() 2020-07-27 14:31:07 -04:00
signal.h x86/signal: Introduce helpers to get the maximum signal frame size 2021-05-19 11:46:27 +02:00
types.h x86/fpu/xstate: Add supervisor PASID state for ENQCMD 2020-09-17 20:22:10 +02:00
xcr.h x86/fpu: Move xgetbv()/xsetbv() into a separate header 2020-09-07 19:54:20 +02:00
xstate.h x86/fpu: Mask PKRU from kernel XRSTOR[S] operations 2021-06-23 19:47:35 +02:00