* [PATCH] powerpc: Fix do_page_fault to check for HWPOISON flag.
@ 2014-09-23 5:42 Henish Patel
0 siblings, 0 replies; only message in thread
From: Henish Patel @ 2014-09-23 5:42 UTC (permalink / raw)
To: michael, linuxppc-dev, paulus, benh
The current implementation of do_page_fault does not check whether the
page being accessed is marked hwpiosoned or not. Hence when an
application tries to access page that is marked hwpoisoned, it results
into Linux hypervisor crash and system goes into IPLing state.
This patch fixes this issue by adding a check for HWPOISON flag and send
SIGBUS to an application that is trying to access hwpoisoned page.
Signed-off-by: Henish Patel <hpatel@linux.vnet.ibm.com>
---
arch/powerpc/mm/fault.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/powerpc/mm/fault.c b/arch/powerpc/mm/fault.c
index 51ab9e7..5e9b4fd 100644
--- a/arch/powerpc/mm/fault.c
+++ b/arch/powerpc/mm/fault.c
@@ -170,10 +170,10 @@ static int mm_fault_error(struct pt_regs *regs, unsigned long addr, int fault)
return MM_FAULT_RETURN;
}
- /* Bus error. x86 handles HWPOISON here, we'll add this if/when
- * we support the feature in HW
+ /* Send SIGBUS to the application when it tries to access a page,
+ * which has been marked as HWPOISON.
*/
- if (fault & VM_FAULT_SIGBUS)
+ if (fault & (VM_FAULT_SIGBUS|VM_FAULT_HWPOISON))
return do_sigbus(regs, addr);
/* We don't understand the fault code, this is fatal */
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2014-09-23 5:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-23 5:42 [PATCH] powerpc: Fix do_page_fault to check for HWPOISON flag Henish Patel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).