[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH 10/31] PPC: fix segfault in signal handling code
From: |
Alexander Graf |
Subject: |
[Qemu-ppc] [PATCH 10/31] PPC: fix segfault in signal handling code |
Date: |
Mon, 7 Jan 2013 16:38:39 +0100 |
From: Samuel Seay <address@hidden>
Removed h2g() macro around the ka->_sa_handler due to the _sa_handler being a
guest memory address.
Changed the __put_user to put_user as it was attempting to put a value at the
stack address but the new address is a guest memory address, __put_user is
for host memory addresses.
Signed-off-by: Samuel Seay <address@hidden>
Reviewed-by: Peter Maydell <address@hidden>
[agraf: change subject line, reformat commit message]
Signed-off-by: Alexander Graf <address@hidden>
---
linux-user/signal.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/linux-user/signal.c b/linux-user/signal.c
index 95e2ffa..c43b8ac 100644
--- a/linux-user/signal.c
+++ b/linux-user/signal.c
@@ -4584,7 +4584,7 @@ static void setup_frame(int sig, struct target_sigaction
*ka,
signal = current_exec_domain_sig(sig);
- err |= __put_user(h2g(ka->_sa_handler), &sc->handler);
+ err |= __put_user(ka->_sa_handler, &sc->handler);
err |= __put_user(set->sig[0], &sc->oldmask);
#if defined(TARGET_PPC64)
err |= __put_user(set->sig[0] >> 32, &sc->_unused[3]);
@@ -4606,7 +4606,7 @@ static void setup_frame(int sig, struct target_sigaction
*ka,
/* Create a stack frame for the caller of the handler. */
newsp = frame_addr - SIGNAL_FRAMESIZE;
- err |= __put_user(env->gpr[1], (target_ulong *)(uintptr_t) newsp);
+ err |= put_user(env->gpr[1], newsp, target_ulong);
if (err)
goto sigsegv;
--
1.6.0.2
- [Qemu-ppc] [PULL 00/31] ppc patch queue 2013-01-07, Alexander Graf, 2013/01/07
- [Qemu-ppc] [PATCH 05/31] openpic: s/opp->nb_irqs -1/opp->nb_cpus - 1/, Alexander Graf, 2013/01/07
- [Qemu-ppc] [PATCH 02/31] openpic: remove pcsr (CPU sensitivity register), Alexander Graf, 2013/01/07
- [Qemu-ppc] [PATCH 06/31] openpic: don't crash on a register access without a CPU context, Alexander Graf, 2013/01/07
- [Qemu-ppc] [PATCH 04/31] openpic: BRR1 is not a CPU-specific register., Alexander Graf, 2013/01/07
- [Qemu-ppc] [PATCH 10/31] PPC: fix segfault in signal handling code,
Alexander Graf <=
- [Qemu-ppc] [PATCH 07/31] powerpc: linux header sync script includes epapr_hcalls.h, Alexander Graf, 2013/01/07
- [Qemu-ppc] [PATCH 03/31] openpic: support large vectors on FSL mpic, Alexander Graf, 2013/01/07
- [Qemu-ppc] [PATCH 08/31] openpic: fix coding style issues, Alexander Graf, 2013/01/07
- [Qemu-ppc] [PATCH 18/31] openpic: always call IRQ_check from IRQ_get_next, Alexander Graf, 2013/01/07
- [Qemu-ppc] [PATCH 19/31] Revert "openpic: Accelerate pending irq search", Alexander Graf, 2013/01/07
- [Qemu-ppc] [PATCH 23/31] openpic: IRQ_check: search the queue a word at a time, Alexander Graf, 2013/01/07
- [Qemu-ppc] [PATCH 21/31] openpic: add some bounds checking for IRQ numbers, Alexander Graf, 2013/01/07
- [Qemu-ppc] [PATCH 29/31] target-ppc: Slim conversion of model definitions to QOM subclasses, Alexander Graf, 2013/01/07
- [Qemu-ppc] [PATCH 31/31] PPC: linux-user: Calculate context pointer explicitly, Alexander Graf, 2013/01/07
- [Qemu-ppc] [PATCH 26/31] kvm: Update kernel headers, Alexander Graf, 2013/01/07