[klibc] alpha: Pass restorer to rt_sigaction() and disable executable stack
authorBen Hutchings <ben@decadent.org.uk>
Sun, 23 Aug 2020 14:18:19 +0000 (15:18 +0100)
committerBen Hutchings <benh@debian.org>
Fri, 30 Apr 2021 01:05:23 +0000 (02:05 +0100)
commit921cc68bf1ee9d0344df57fffb6ac187c5a38afb
tree1736e597f606a8ad055b6eca9fe0c8663c42ec54
parentad7c51da29c0c49385f5a17cd22c9f42db30b2c1
[klibc] alpha: Pass restorer to rt_sigaction() and disable executable stack

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

alpha does not support the SA_RESTORER flag, but allows specifiying a
restorer callback as an additional parameter to rt_sigaction().  We
should do this to avoid needing an executable stack.

* Force the SA_SIGINFO flag on for all signal handlers, so that we can
  always return from them with rt_sigreturn
* Define a __sigreturn() routine that calls rt_sigreturn
* Pass that routine as the last argument to rt_sigaction()
* Set KLIBCEXECSTACK=n

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Gbp-Pq: Name 0004-klibc-alpha-Pass-restorer-to-rt_sigaction-and-disabl.patch
usr/include/arch/alpha/klibc/archconfig.h
usr/klibc/arch/alpha/Kbuild
usr/klibc/arch/alpha/MCONFIG
usr/klibc/arch/alpha/sigreturn.S [new file with mode: 0644]
usr/klibc/sigaction.c