public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] SA_SIGINFO was forgotten
@ 2006-10-31 18:09 Albert Cahalan
  2006-11-02 17:34 ` Andi Kleen
  0 siblings, 1 reply; 2+ messages in thread
From: Albert Cahalan @ 2006-10-31 18:09 UTC (permalink / raw)
  To: Andrew Morton, linux-kernel, Linus Torvalds, Andi Kleen

The recent change to make x86_64 support i386 binaries compiled
with -mregparm=3 only covered signal handlers without SA_SIGINFO.
(the 3-arg "real-time" ones)

To be compatible with i386, both types should be supported.

Signed-off-by: Albert Cahalan <acahalan@gmail.com>

diff -Naurd old/arch/x86_64/ia32/ia32_signal.c
new/arch/x86_64/ia32/ia32_signal.c
--- old/arch/x86_64/ia32/ia32_signal.c  2006-10-29 20:36:01.000000000 -0500
+++ new/arch/x86_64/ia32/ia32_signal.c  2006-10-29 21:58:01.000000000 -0500
@@ -579,6 +579,11 @@
       regs->rsp = (unsigned long) frame;
       regs->rip = (unsigned long) ka->sa.sa_handler;

+       /* Make -mregparm=3 work */
+       regs->rax = sig;
+       regs->rdx = (unsigned long) &frame->info;
+       regs->rcx = (unsigned long) &frame->uc;
+
       asm volatile("movl %0,%%ds" :: "r" (__USER32_DS));
       asm volatile("movl %0,%%es" :: "r" (__USER32_DS));

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-11-02 17:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-31 18:09 [PATCH] SA_SIGINFO was forgotten Albert Cahalan
2006-11-02 17:34 ` Andi Kleen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox