提交 536e3ee4 编写于 作者: A Andi Kleen 提交者: Andi Kleen

[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: NAndi Kleen <ak@suse.de>
上级 dd54a110
......@@ -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));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册