[PATCH] sparc: Move sigreturn stub to assembly
Zack Weinberg
zackw@panix.com
Thu Mar 5 21:34:00 GMT 2020
On Thu, Mar 5, 2020 at 2:22 PM Adhemerval Zanella
<adhemerval.zanella@linaro.org> wrote:
>
> As indicated by kernel developers [1], the sigreturn stub can not change
> the register window or the stack pointer since the kernel has setup the
> restore frame at a precise location relative to the stack pointer when
> the stub is invoked.
>
> I tried to play with some compiler flags and even with _Noreturn and
> __builtin_unreachable after the asm does not help (and Sparc does not
> support naked functions).
>
> To avoid similar issues, as the stack-protector support also have
> stumbled, this patch moves the implementation of the sigreturn stubs to
> assembly.
Could you add a comment explaining this to each of the new .S files?
"This function must not change the register window or the stack
pointer" would be enough, I think. Maybe include the URL for [1].
zw
More information about the Libc-alpha
mailing list