aboutsummaryrefslogtreecommitdiff
path: root/linux-user/main.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2016-08-03 17:55:23 +1000
committerDavid Gibson <david@gibson.dropbear.id.au>2016-09-07 12:40:12 +1000
commitba4a8df83f474be1ba02510f960e5224f29d229c (patch)
tree7df65b719633d5d973c34869c3173ac23f835101 /linux-user/main.c
parentdd2fa4f72d1ce44ce1635fe3a744bd47d8f2ab05 (diff)
ppc: Fix catching some segfaults in user mode
The usermode "translate" code generates an error code value that has the "is_write" bit set, which causes our switch/case to miss and display "Invalid segfault errno" and a spurrious second state dump. Fix it. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'linux-user/main.c')
-rw-r--r--linux-user/main.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/linux-user/main.c b/linux-user/main.c
index d112834644..32070a4a0f 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -1656,6 +1656,7 @@ void cpu_loop(CPUPPCState *env)
/* XXX: check this. Seems bugged */
switch (env->error_code & 0xFF000000) {
case 0x40000000:
+ case 0x42000000:
info.si_signo = TARGET_SIGSEGV;
info.si_errno = 0;
info.si_code = TARGET_SEGV_MAPERR;