powerpc/mce: Handle UE event for memcpy_mcsafe
If we take a UE on one of the instructions with a fixup entry, set nip to continue execution at the fixup entry. Stop processing the event further or print it. Co-developed-by: Reza Arbab <arbab@linux.ibm.com> Signed-off-by: Reza Arbab <arbab@linux.ibm.com> Signed-off-by: Balbir Singh <bsingharora@gmail.com> Reviewed-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com> Reviewed-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Santosh Sivaraj <santosh@fossix.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20190820081352.8641-6-santosh@fossix.org
This commit is contained in:

committed by
Michael Ellerman

vanhempi
49ec9177b8
commit
895e3dceeb
@@ -11,6 +11,7 @@
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/ptrace.h>
|
||||
#include <linux/extable.h>
|
||||
#include <asm/mmu.h>
|
||||
#include <asm/mce.h>
|
||||
#include <asm/machdep.h>
|
||||
@@ -18,6 +19,7 @@
|
||||
#include <asm/pte-walk.h>
|
||||
#include <asm/sstep.h>
|
||||
#include <asm/exception-64s.h>
|
||||
#include <asm/extable.h>
|
||||
|
||||
/*
|
||||
* Convert an address related to an mm to a PFN. NOTE: we are in real
|
||||
@@ -565,9 +567,18 @@ static int mce_handle_derror(struct pt_regs *regs,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static long mce_handle_ue_error(struct pt_regs *regs)
|
||||
static long mce_handle_ue_error(struct pt_regs *regs,
|
||||
struct mce_error_info *mce_err)
|
||||
{
|
||||
long handled = 0;
|
||||
const struct exception_table_entry *entry;
|
||||
|
||||
entry = search_kernel_exception_table(regs->nip);
|
||||
if (entry) {
|
||||
mce_err->ignore_event = true;
|
||||
regs->nip = extable_fixup(entry);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* On specific SCOM read via MMIO we may get a machine check
|
||||
@@ -600,7 +611,7 @@ static long mce_handle_error(struct pt_regs *regs,
|
||||
&phys_addr);
|
||||
|
||||
if (!handled && mce_err.error_type == MCE_ERROR_TYPE_UE)
|
||||
handled = mce_handle_ue_error(regs);
|
||||
handled = mce_handle_ue_error(regs, &mce_err);
|
||||
|
||||
save_mce_event(regs, handled, &mce_err, regs->nip, addr, phys_addr);
|
||||
|
||||
|
Viittaa uudesa ongelmassa
Block a user