[PATCH 1/2] powerpc/64: Bump SIGSTKSZ and MINSIGSTKSZ
Nicholas Piggin
npiggin at gmail.com
Tue Mar 8 05:27:33 AEDT 2022
The sad tale of SIGSTKSZ and MINSIGSTKSZ is documented in glibc.git
commit f7c399cff5bd ("PowerPC SIGSTKSZ"), which explains why glibc
does not use the kernel defines for these constants. Since then in
fact there has been a further expansion of the signal stack frame size
on little-endian with linux commit 573ebfa6601f ("powerpc: Increase
stack redzone for 64-bit userspace to 512 bytes"), which has caused
it to exceed even the glibc defines.
Increase MINSIGSTKSZ to 8192 which is double the current glibc value
and fits the current stack frame with room to grow. SIGSTKSZ is set
to 4x the minimum as convention.
glibc will have to be updated as well.
Cc: Alan Modra <amodra at gmail.com>
Cc: Tulio Magno Quites Machado Filho <tuliom at linux.ibm.com>
Signed-off-by: Nicholas Piggin <npiggin at gmail.com>
---
arch/powerpc/include/uapi/asm/signal.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/powerpc/include/uapi/asm/signal.h b/arch/powerpc/include/uapi/asm/signal.h
index 04873dd311c2..81fa9d90be80 100644
--- a/arch/powerpc/include/uapi/asm/signal.h
+++ b/arch/powerpc/include/uapi/asm/signal.h
@@ -62,8 +62,13 @@ typedef struct {
#define SA_RESTORER 0x04000000U
+#ifdef __powerpc64__
+#define MINSIGSTKSZ 8192
+#define SIGSTKSZ 32768
+#else
#define MINSIGSTKSZ 2048
#define SIGSTKSZ 8192
+#endif
#include <asm-generic/signal-defs.h>
--
2.23.0
More information about the Linuxppc-dev
mailing list