arm64: Reserve register x18 from general allocation with SCS
authorSami Tolvanen <samitolvanen@google.com>
Mon, 27 Apr 2020 16:00:11 +0000 (09:00 -0700)
committerWill Deacon <will@kernel.org>
Fri, 15 May 2020 15:35:49 +0000 (16:35 +0100)
commitda64e9d1f8c3dad6898dac6edb39a68d3aa9ce93
treedf04377d65e9c322df4a1fd0824ca27457427e99
parentddc9863e9e9025e2fc0c8dba31cc060cd626606f
arm64: Reserve register x18 from general allocation with SCS

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>
Acked-by: Will Deacon <will@kernel.org>
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/Makefile