[RFC PATCH v2 3/3] arm64: implement dynamic shadow call stack for Clang

Sami Tolvanen samitolvanen at google.com
Tue May 17 18:53:44 PDT 2022


On Thu, May 5, 2022 at 2:01 PM Nick Desaulniers <ndesaulniers at google.com> wrote:
>
> On Thu, May 5, 2022 at 9:10 AM Ard Biesheuvel <ardb at kernel.org> wrote:
> > +enum {
> > +       PACIASP         = 0xd503233f,
> > +       AUTIASP         = 0xd50323bf,
> > +       SCS_PUSH        = 0xf800865e,
> > +       SCS_POP         = 0xf85f8e5e,
> > +};
>
> Is there anything we can reuse from arch/arm64/include/asm/insn.h
> rather than hardcoding these values?

I think hardcoding the instructions should be fine. You could use
aarch64_insn_gen_hint for the first two, but the last time I checked
we didn't have code for generating the SCS push/pop instructions.

Sami



More information about the linux-arm-kernel mailing list