Commit a7aacdf9 authored by Albert Cahalan's avatar Albert Cahalan Committed by Linus Torvalds
Browse files

[PATCH] fix i386 regparm=3 RT signal handlers on x86_64

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) This is useful for klibc at least.
Signed-off-by: default avatarAlbert Cahalan <>
Signed-off-by: default avatarLinus Torvalds <>
parent 202dd450
......@@ -579,6 +579,11 @@ int ia32_setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
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));
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment