aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68k/include/asm/current.h
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2022-02-19 17:20:02 -0800
committerKees Cook <keescook@chromium.org>2022-02-26 20:32:03 -0800
commit575d6b77fa2697afd2b3a443f7f879faa65ae0ca (patch)
tree9dfb690f0e69086eef55ba4dbbb51a7e0a48ab64 /arch/m68k/include/asm/current.h
parentxtensa: Implement "current_stack_pointer" (diff)
downloadlinux-dev-575d6b77fa2697afd2b3a443f7f879faa65ae0ca.tar.xz
linux-dev-575d6b77fa2697afd2b3a443f7f879faa65ae0ca.zip
m68k: Implement "current_stack_pointer"
To follow the existing per-arch conventions, add asm "sp" as "current_stack_pointer". This will let it be used in non-arch places (like HARDENED_USERCOPY). Cc: linux-m68k@lists.linux-m68k.org Signed-off-by: Kees Cook <keescook@chromium.org> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> Link: https://lore.kernel.org/lkml/CAMuHMdU6msvi0j=mS28GFYbm+uMRk7PkYe+zOM4sDmOVxeibLQ@mail.gmail.com
Diffstat (limited to 'arch/m68k/include/asm/current.h')
-rw-r--r--arch/m68k/include/asm/current.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/m68k/include/asm/current.h b/arch/m68k/include/asm/current.h
index 6390ef2f7f86..c117907e1276 100644
--- a/arch/m68k/include/asm/current.h
+++ b/arch/m68k/include/asm/current.h
@@ -24,6 +24,8 @@ static inline struct task_struct *get_current(void)
#define current get_current()
-#endif /* CONFNIG_MMU */
+#endif /* CONFIG_MMU */
+
+register unsigned long current_stack_pointer __asm__("sp");
#endif /* !(_M68K_CURRENT_H) */