Re: [PATCH v6 09/15] arm64: reserve x18 from general allocation with SCS

Will Deacon
2020-01-16T18:20:46Z

On Fri, Dec 06, 2019 at 02:13:45PM -0800, Sami Tolvanen wrote:
> Reserve the x18 register from general allocation when SCS is enabled,
> because the compiler uses the register to store the current task's
> shadow stack pointer. Note that all external kernel modules must also be
> compiled with -ffixed-x18 if the kernel has SCS enabled.
>
> Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
> Reviewed-by: Kees Cook <keescook@chromium.org>
> ---
> arch/arm64/Makefile | 4 ++++
> 1 file changed, 4 insertions(+)

Acked-by: Will Deacon <will@kernel.org>

Will