[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250129094312.27399-4-ink@unseen.parts>
Date: Wed, 29 Jan 2025 10:43:11 +0100
From: Ivan Kokshaysky <ink@...een.parts>
To: Richard Henderson <richard.henderson@...aro.org>,
Matt Turner <mattst88@...il.com>,
Oleg Nesterov <oleg@...hat.com>,
Al Viro <viro@...iv.linux.org.uk>,
Arnd Bergmann <arnd@...db.de>,
"Paul E. McKenney" <paulmck@...nel.org>
Cc: "Maciej W. Rozycki" <macro@...am.me.uk>,
Magnus Lindholm <linmag7@...il.com>,
linux-alpha@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH 3/4] alpha: make stack 16-byte aligned (most cases)
Add padding between the PAL-saved and kernel-saved registers
so that 'struct pt_regs' have an even number of 64-bit words.
This makes the stack properly aligned for most of the kernel
code, except two handlers which need special threatment.
Tested-by: Magnus Lindholm <linmag7@...il.com>
Signed-off-by: Ivan Kokshaysky <ink@...een.parts>
---
arch/alpha/include/asm/ptrace.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/alpha/include/asm/ptrace.h b/arch/alpha/include/asm/ptrace.h
index 693d4c5b4dc7..694b82ca62f3 100644
--- a/arch/alpha/include/asm/ptrace.h
+++ b/arch/alpha/include/asm/ptrace.h
@@ -41,6 +41,8 @@ struct pt_regs {
unsigned long trap_a0;
unsigned long trap_a1;
unsigned long trap_a2;
+/* This makes the stack 16-byte aligned as GCC expects */
+ unsigned long __pad0;
/* These are saved by PAL-code: */
unsigned long ps;
unsigned long pc;
--
2.39.5
Powered by blists - more mailing lists