[lkml]   [2004]   [Aug]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH] ppc64: Fix v_regs pointer setup
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 <>


linux- | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)

diff -puN arch/ppc64/kernel/signal.c~signal_fix arch/ppc64/kernel/signal.c
--- linux- 2004-08-18 20:30:23.000000000 +0530
+++ linux- 2004-08-18 20:31:35.000000000 +0530
@@ -127,7 +127,7 @@ static long setup_sigcontext(struct sigc
* v_regs pointer or not
- 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);
long err = 0;



Thanks and Regards,
Srivatsa Vaddagiri,
Linux Technology Center,
IBM Software Labs,
Bangalore, INDIA - 560017
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 14:05    [W:0.018 / U:0.940 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site