[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)
committerBen Hutchings <benh@debian.org>
Fri, 30 Apr 2021 01:05:23 +0000 (02:05 +0100)
commitad7c51da29c0c49385f5a17cd22c9f42db30b2c1
treedb2b91242f95bfe11e595d18816565ef3b94b0c8
parent9d70106a0c29fda73567adc684f5a1f19c9e2eee
[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