From bd1912de892ce30e1e2242e67716d25188fbfa44 Mon Sep 17 00:00:00 2001 From: Kees Cook Date: Wed, 23 Feb 2022 22:05:58 -0800 Subject: alpha: Implement "current_stack_pointer" To follow the existing per-arch conventions replace open-coded use of asm "$30" as "current_stack_pointer". This will let it be used in non-arch places (like HARDENED_USERCOPY). Cc: Richard Henderson Cc: Ivan Kokshaysky Cc: Matt Turner Cc: Geert Uytterhoeven Cc: Andrew Morton Cc: Mike Rapoport Cc: Mark Rutland Cc: "Peter Zijlstra (Intel)" Cc: Kefeng Wang Cc: "Alexander A. Klimov" Cc: linux-alpha@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: Matt Turner --- arch/alpha/lib/stacktrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/alpha/lib/stacktrace.c') diff --git a/arch/alpha/lib/stacktrace.c b/arch/alpha/lib/stacktrace.c index 62454a7810e2..2b1176dd5174 100644 --- a/arch/alpha/lib/stacktrace.c +++ b/arch/alpha/lib/stacktrace.c @@ -92,7 +92,7 @@ stacktrace(void) { instr * ret_pc; instr * prologue = (instr *)stacktrace; - register unsigned char * sp __asm__ ("$30"); + unsigned char *sp = (unsigned char *)current_stack_pointer; printk("\tstack trace:\n"); do { -- cgit v1.2.3