Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 07 Mar 2014 13:36:12 -0700
From:      Ian Lepore <ian@FreeBSD.org>
To:        Takashi Komatsu <komatsu.taka@jp.panasonic.com>
Cc:        freebsd-arm <freebsd-arm@FreeBSD.org>
Subject:   Re: The arguments of sys_sigreturn
Message-ID:  <1394224572.1149.379.camel@revolution.hippie.lan>
In-Reply-To: <20140306135349.5C75.2910CF64@jp.panasonic.com>
References:  <20140306135349.5C75.2910CF64@jp.panasonic.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1394224572.1149.379.camel>