linux-uconsole/arch/x86/include
Thomas Gleixner f3a56cd3ea x86/fpu: Return proper error codes from user access functions
[ Upstream commit aee8c67a4f ]

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
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-07-20 16:05:48 +02:00
..
asm x86/fpu: Return proper error codes from user access functions 2021-07-20 16:05:48 +02:00
uapi/asm x86/elf: Use _BITUL() macro in UAPI headers 2021-07-14 16:56:04 +02:00