]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] Initialize argument registers for 32bit signal handlers.
authorAndi Kleen <ak@suse.de>
Tue, 26 Sep 2006 08:52:41 +0000 (10:52 +0200)
committerAndi Kleen <andi@basil.nowhere.org>
Tue, 26 Sep 2006 08:52:41 +0000 (10:52 +0200)
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>
arch/x86_64/ia32/ia32_signal.c

index 2d20f8304b31b4377eb11aae11ab89621799b69a..ced15012a3d754f80c392ddfdb96ed34fb30e095 100644 (file)
@@ -478,6 +478,11 @@ int ia32_setup_frame(int sig, struct k_sigaction *ka,
        regs->rsp = (unsigned long) frame;
        regs->rip = (unsigned long) ka->sa.sa_handler;
 
+       /* Make -mregparm=3 work */
+       regs->rax = sig;
+       regs->rdx = 0;
+       regs->rcx = 0;
+
        asm volatile("movl %0,%%ds" :: "r" (__USER32_DS)); 
        asm volatile("movl %0,%%es" :: "r" (__USER32_DS));