mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-03-16 12:14:06 +00:00
x86/extable: Provide EX_TYPE_DEFAULT_MCE_SAFE and EX_TYPE_FAULT_MCE_SAFE
[ Upstream commit 2cadf5248b
]
Provide exception fixup types which can be used to identify fixups which
allow in kernel #MC recovery and make them invoke the existing handlers.
These will be used at places where #MC recovery is handled correctly by the
caller.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/20210908132525.269689153@linutronix.de
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
260724cab0
commit
a4dda0e9d9
3 changed files with 7 additions and 0 deletions
|
@ -16,4 +16,7 @@
|
|||
#define EX_TYPE_WRMSR_IN_MCE 10
|
||||
#define EX_TYPE_RDMSR_IN_MCE 11
|
||||
|
||||
#define EX_TYPE_DEFAULT_MCE_SAFE 12
|
||||
#define EX_TYPE_FAULT_MCE_SAFE 13
|
||||
|
||||
#endif
|
||||
|
|
|
@ -278,6 +278,8 @@ static int error_context(struct mce *m, struct pt_regs *regs)
|
|||
m->kflags |= MCE_IN_KERNEL_COPYIN;
|
||||
fallthrough;
|
||||
case EX_TYPE_FAULT:
|
||||
case EX_TYPE_FAULT_MCE_SAFE:
|
||||
case EX_TYPE_DEFAULT_MCE_SAFE:
|
||||
m->kflags |= MCE_IN_KERNEL_RECOV;
|
||||
return IN_KERNEL_RECOV;
|
||||
default:
|
||||
|
|
|
@ -131,8 +131,10 @@ int fixup_exception(struct pt_regs *regs, int trapnr, unsigned long error_code,
|
|||
|
||||
switch (e->type) {
|
||||
case EX_TYPE_DEFAULT:
|
||||
case EX_TYPE_DEFAULT_MCE_SAFE:
|
||||
return ex_handler_default(e, regs);
|
||||
case EX_TYPE_FAULT:
|
||||
case EX_TYPE_FAULT_MCE_SAFE:
|
||||
return ex_handler_fault(e, regs, trapnr);
|
||||
case EX_TYPE_UACCESS:
|
||||
return ex_handler_uaccess(e, regs, trapnr);
|
||||
|
|
Loading…
Add table
Reference in a new issue