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
This commit is contained in:
parent
92652cf986
commit
575d6b77fa
|
@ -4,6 +4,7 @@ config M68K
|
|||
default y
|
||||
select ARCH_32BIT_OFF_T
|
||||
select ARCH_HAS_BINFMT_FLAT
|
||||
select ARCH_HAS_CURRENT_STACK_POINTER
|
||||
select ARCH_HAS_DMA_PREP_COHERENT if HAS_DMA && MMU && !COLDFIRE
|
||||
select ARCH_HAS_SYNC_DMA_FOR_DEVICE if HAS_DMA
|
||||
select ARCH_HAVE_NMI_SAFE_CMPXCHG if RMW_INSNS
|
||||
|
|
|
@ -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) */
|
||||
|
|
Loading…
Reference in New Issue