[klibc] sparc: Set sa_restorer for signals and disable executable stack
authorBen Hutchings <ben@decadent.org.uk>
Thu, 30 Apr 2020 12:56:47 +0000 (13:56 +0100)
committerThorsten Glaser <tg@mirbsd.de>
Wed, 26 May 2021 22:12:10 +0000 (23:12 +0100)
commit211f6e551976d41125e4e9e03c183be3c8f1dab9
treebf789612ecd27a463b202f4545cef9bbb2c1fe3a
parentdf08ba6b23953343bbe2ba1a6138baf4f897ec03
[klibc] sparc: Set sa_restorer for signals and disable executable stack

Origin: https://git.kernel.org/pub/scm/libs/klibc/klibc.git/commit/?id=05350b72cace18417c1ba00c4796a5e19ebb908b

sparc allows specifiying a signal restorer in the usual way.  We
should do this to avoid needing an executable stack.

* Define a __sigreturn() routine that calls rt_sigreturn
* Force the SA_RESTORER flag on for all signal handlers, and set
  __sigreturn as the restorer if none is already set
* Force the SA_SIGINFO flag on for all signal handlers, so that we can
  always return from them with rt_sigreturn
* Set KLIBCEXECSTACK=n

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Gbp-Pq: Name 0005-klibc-sparc-Set-sa_restorer-for-signals-and-disable-.patch
usr/include/arch/sparc/klibc/archconfig.h
usr/klibc/SYSCALLS.def
usr/klibc/arch/sparc/MCONFIG