From: Srivatsa Vaddagiri <vatsa@in.ibm.com>
To: paulus@samba.org
Cc: Andrew Morton <akpm@osdl.org>, linux-kernel@vger.kernel.org
Subject: [PATCH] ppc64: Fix v_regs pointer setup
Date: Wed, 18 Aug 2004 20:42:40 +0530 [thread overview]
Message-ID: <20040818151240.GB9524@in.ibm.com> (raw)
During some signal test, we found that v_regs pointer was not setup correctly.
v_regs was made to point to itself, as a result of which the pointer was
corrupted when vec registers were copied over. When the signal handler
returned, restore_sigcontext tried derefering the invalid pointer and in
the process killed the app with SIGSEGV.
Following patch should fix it. Please review and apply:
Signed-off-by: Srivatsa Vaddagiri <vatsa@in.ibm.com>
---
linux-2.6.8.1-vatsa/arch/ppc64/kernel/signal.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
diff -puN arch/ppc64/kernel/signal.c~signal_fix arch/ppc64/kernel/signal.c
--- linux-2.6.8.1/arch/ppc64/kernel/signal.c~signal_fix 2004-08-18 20:30:23.000000000 +0530
+++ linux-2.6.8.1-vatsa/arch/ppc64/kernel/signal.c 2004-08-18 20:31:35.000000000 +0530
@@ -127,7 +127,7 @@ static long setup_sigcontext(struct sigc
* v_regs pointer or not
*/
#ifdef CONFIG_ALTIVEC
- elf_vrreg_t __user *v_regs = (elf_vrreg_t __user *)(((unsigned long)sc->vmx_reserve) & ~0xful);
+ elf_vrreg_t __user *v_regs = (elf_vrreg_t __user *)(((unsigned long)sc->vmx_reserve + 16) & ~0xful);
#endif
long err = 0;
_
--
Thanks and Regards,
Srivatsa Vaddagiri,
Linux Technology Center,
IBM Software Labs,
Bangalore, INDIA - 560017
reply other threads:[~2004-08-18 15:11 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=20040818151240.GB9524@in.ibm.com \
--to=vatsa@in.ibm.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--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
all inboxes | Powered by JetHome®