]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit9489a05f5ff93fac37f39d6dbcb69ab079aabb42
treedf04377d65e9c322df4a1fd0824ca27457427e99
parent35c2f95b4f403de75b74dea801846b640592a252
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