aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorAndi Kleen <ak@suse.de>2006-09-26 04:52:41 -0400
committerAndi Kleen <andi@basil.nowhere.org>2006-09-26 04:52:41 -0400
commit536e3ee4fed13d2d4bbf1b775174aba0cadf6aba (patch)
tree74bd05ecdbada0e6029d0be13a2a4ec93dae0df0 /arch
parentdd54a11004b2c9a1f136225f880e021a43b0eadc (diff)
[PATCH] Initialize argument registers for 32bit signal handlers.
In case the user space was compiled with -mregparm=3 Following i386. Pointed out by Albert Cahalan Signed-off-by: Andi Kleen <ak@suse.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86_64/ia32/ia32_signal.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86_64/ia32/ia32_signal.c b/arch/x86_64/ia32/ia32_signal.c
index 2d20f8304b31..ced15012a3d7 100644
--- a/arch/x86_64/ia32/ia32_signal.c
+++ b/arch/x86_64/ia32/ia32_signal.c
@@ -478,6 +478,11 @@ int ia32_setup_frame(int sig, struct k_sigaction *ka,
478 regs->rsp = (unsigned long) frame; 478 regs->rsp = (unsigned long) frame;
479 regs->rip = (unsigned long) ka->sa.sa_handler; 479 regs->rip = (unsigned long) ka->sa.sa_handler;
480 480
481 /* Make -mregparm=3 work */
482 regs->rax = sig;
483 regs->rdx = 0;
484 regs->rcx = 0;
485
481 asm volatile("movl %0,%%ds" :: "r" (__USER32_DS)); 486 asm volatile("movl %0,%%ds" :: "r" (__USER32_DS));
482 asm volatile("movl %0,%%es" :: "r" (__USER32_DS)); 487 asm volatile("movl %0,%%es" :: "r" (__USER32_DS));
483 488