From: Henish Patel <hpatel@linux.vnet.ibm.com>
To: michael@ellerman.id.au, linuxppc-dev@ozlabs.org,
paulus@samba.org, benh@kernel.crashing.org
Subject: [PATCH] powerpc: Fix do_page_fault to check for HWPOISON flag.
Date: Tue, 23 Sep 2014 11:12:36 +0530 [thread overview]
Message-ID: <20140923054236.18176.50982.stgit@localhost.localdomain> (raw)
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 */
reply other threads:[~2014-09-23 5:42 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140923054236.18176.50982.stgit@localhost.localdomain \
--to=hpatel@linux.vnet.ibm.com \
--cc=benh@kernel.crashing.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=michael@ellerman.id.au \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).