Thread (13 messages) 13 messages, 3 authors, 2018-10-02

[PATCH 2/2] powerpc/64: Increase stack redzone for 64-bit kernel to 512 bytes

From: Bin Meng <hidden>
Date: 2018-09-30 06:22:50
Subsystem: linux for powerpc (32-bit and 64-bit), ptrace support, the rest · Maintainers: Madhavan Srinivasan, Michael Ellerman, Oleg Nesterov, Linus Torvalds

commit 573ebfa6601f ("powerpc: Increase stack redzone for 64-bit
userspace to 512 bytes") only changes stack userspace redzone size.
We need increase the kernel one to 512 bytes too per ABIv2 spec.

Signed-off-by: Bin Meng <redacted>
---

 arch/powerpc/include/asm/ptrace.h | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/arch/powerpc/include/asm/ptrace.h b/arch/powerpc/include/asm/ptrace.h
index 447cbd1..817be3f 100644
--- a/arch/powerpc/include/asm/ptrace.h
+++ b/arch/powerpc/include/asm/ptrace.h
@@ -30,16 +30,12 @@
 #ifdef __powerpc64__
 
 /*
- * Size of redzone that userspace is allowed to use below the stack
+ * Size of redzone that kernel/userspace is allowed to use below the stack
  * pointer.  This is 288 in the 64-bit big-endian ELF ABI, and 512 in
  * the new ELFv2 little-endian ABI, so we allow the larger amount.
- *
- * For kernel code we allow a 288-byte redzone, in order to conserve
- * kernel stack space; gcc currently only uses 288 bytes, and will
- * hopefully allow explicit control of the redzone size in future.
  */
 #define USER_REDZONE_SIZE	512
-#define KERNEL_REDZONE_SIZE	288
+#define KERNEL_REDZONE_SIZE	512
 
 #define STACK_FRAME_OVERHEAD	112	/* size of minimum stack frame */
 #define STACK_FRAME_LR_SAVE	2	/* Location of LR in stack frame */
-- 
2.7.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help