[klibc] s390: Set sa_restorer for signals and disable executable stack
authorBen Hutchings <ben@decadent.org.uk>
Thu, 30 Apr 2020 02:38:34 +0000 (03:38 +0100)
committerThorsten Glaser <tg@mirbsd.de>
Wed, 26 May 2021 22:12:10 +0000 (23:12 +0100)
commitabc76ef852c35d85d923a127bcc41c1ec65f8257
tree70ce3489bb1ac7a99676b949e0769699ba8f497c
parentc7bef662497fefeb706ee8cc082774f2280e523b
[klibc] s390: Set sa_restorer for signals and disable executable stack

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

s390 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 0003-klibc-s390-Set-sa_restorer-for-signals-and-disable-e.patch
usr/include/arch/s390/klibc/archconfig.h
usr/klibc/SYSCALLS.def
usr/klibc/arch/s390/MCONFIG