Messages in this thread | | | From | Geert Uytterhoeven <> | Date | Thu, 24 Feb 2022 09:59:08 +0100 | Subject | Re: [PATCH] m68k: Implement "current_stack_pointer" |
| |
Hi Kees,
On Thu, Feb 24, 2022 at 7:04 AM Kees Cook <keescook@chromium.org> wrote: > 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: Geert Uytterhoeven <geert@linux-m68k.org> > Cc: linux-m68k@lists.linux-m68k.org > Signed-off-by: Kees Cook <keescook@chromium.org>
Thanks for your patch!
> --- 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() > > +register unsigned long current_stack_pointer __asm__("sp");
I don't know what HARDENED_USERCOPY does, so I don't know if you need "usp" (see rdusp()) or "sp"?
> + > #endif /* CONFNIG_MMU */ > > #endif /* !(_M68K_CURRENT_H) */
Gr{oetje,eeting}s,
Geert
-- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
| |