From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50376) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X1bPO-00086Y-9c for qemu-devel@nongnu.org; Mon, 30 Jun 2014 09:14:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X1bPD-0007Wv-A3 for qemu-devel@nongnu.org; Mon, 30 Jun 2014 09:14:10 -0400 From: Tom Musta Date: Mon, 30 Jun 2014 08:13:36 -0500 Message-Id: <1404134022-17946-2-git-send-email-tommusta@gmail.com> In-Reply-To: <1404134022-17946-1-git-send-email-tommusta@gmail.com> References: <1404134022-17946-1-git-send-email-tommusta@gmail.com> Subject: [Qemu-devel] [PATCH 1/7] linux-user: Fix Stack Pointer Bug in PPC setup_rt_frame List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, qemu-ppc@nongnu.org Cc: Tom Musta , riku.voipio@linaro.org, agraf@suse.de The code that sets the stack frame back pointer is incorrect for the setup_rt_frame() code; qemu will abort (SIGSEGV) in some environments. The setup_frame code was fixed in commit beb526b12134a6b6744125deec5a7fe24a8f92e3 but the setup_rt_frame code was not. Make the setup_rt_frame code consistent with the setup_frame code. Signed-off-by: Tom Musta --- linux-user/signal.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/linux-user/signal.c b/linux-user/signal.c index f3b4378..256f9b9 100644 --- a/linux-user/signal.c +++ b/linux-user/signal.c @@ -4740,7 +4740,7 @@ static void setup_rt_frame(int sig, struct target_sigaction *ka, /* Create a stack frame for the caller of the handler. */ newsp = rt_sf_addr - (SIGNAL_FRAMESIZE + 16); - __put_user(env->gpr[1], (target_ulong *)(uintptr_t) newsp); + err |= put_user(env->gpr[1], newsp, target_ulong); if (err) goto sigsegv; -- 1.7.1