最近,我正在研究Linux 2.4.0中的信号句柄操作。这是问题
asmlinkage int sys_sigreturn(unsigned long __unused)
{
struct pt_regs *regs = (struct pt_regs *) &__unused;
struct sigframe *frame = (struct sigframe *)(regs->esp - 8);
sigset_t set;
int eax;
if (verify_area(VERIFY_READ, frame, sizeof(*frame)))
goto badframe;
if (__get_user(set.sig[0], &frame->sc.oldmask)
|| (_NSIG_WORDS > 1
&& __copy_from_user(&set.sig[1], &frame->extramask,
sizeof(frame->extramask))))
goto badframe;
sigdelsetmask(&set, ~_BLOCKABLE);
spin_lock_irq(¤t->sigmask_lock);
current->blocked = set;
recalc_sigpending(current);
spin_unlock_irq(¤t->sigmask_lock);
if (restore_sigcontext(regs, &frame->sc, &eax))
goto badframe;
return eax;
我没有看到代码设置%ebx,sys_sigreturn是如何获取参数的?为什么此参数与进程用户模式堆栈中的某个地址相同。参数应该在寄存器中!非常感谢!