The arguments of sys_sigreturn

Ian Lepore ian at FreeBSD.org
Fri Mar 7 20:36:19 UTC 2014


On Thu, 2014-03-06 at 13:53 +0900, Takashi Komatsu wrote:
> Hi,
> 
> 
> I have a question about the function of sys_sigreturn.
> [sys/arm/arm/machdep.c]
> 
> In arm codes, the sys_sigreturn function use sigreturn_args.
> I think it has to be used for "struct __ucontext".
> 
> But it use "struct sigframe".
> In fact, it's called with the argument "sigframe" by other function.
> (sys/arm/arm/locore.S: L558)
> 
> On the one hand, it's called by the thread library with "ucontext_t".
> (lib/libthr/thread/thr_sig.c: L256)
> 
> There is collision types.
> 
> I attached my patch.
> Please review.

> Best regards,
> Takashi Komatsu

Yep, you are correct and that patch looks good, committed as r262903.

It took me a while to figure out how sigcode() in locore.S ever gets
called.  The way the arm does the trampoline in/out of the userland
signal handler is harder to understand than how the trampoline code on
other architectures works.

-- Ian




More information about the freebsd-arm mailing list