x86/fpu: Use EX_TYPE_FAULT_MCE_SAFE for exception fixups
authorThomas Gleixner <tglx@linutronix.de>
Wed, 8 Sep 2021 13:29:23 +0000 (15:29 +0200)
committerBorislav Petkov <bp@suse.de>
Mon, 13 Sep 2021 16:15:30 +0000 (18:15 +0200)
commitc6304556f3ae98c943bbb4042a30205c98e4f921
tree9ce2dc33d77e29fdac3320fb13b8c8002bf10d54
parentc1c97d175493ab32325df81133611ce8e4e05088
x86/fpu: Use EX_TYPE_FAULT_MCE_SAFE for exception fixups

The macros used for restoring FPU state from a user space buffer can handle
all exceptions including #MC. They need to return the trap number in the
error case as the code which invokes them needs to distinguish the cause of
the failure. It aborts the operation for anything except #PF.

Use the new EX_TYPE_FAULT_MCE_SAFE exception table fixup type to document
the nature of the fixup.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/20210908132525.387464538@linutronix.de
arch/x86/include/asm/fpu/internal.h