mbox series

[0/2] arm64: harden shadow call stack pointer handling

Message ID 20221205200341.463601-1-ardb@kernel.org (mailing list archive)
Headers show
Series arm64: harden shadow call stack pointer handling | expand

Message

Ard Biesheuvel Dec. 5, 2022, 8:03 p.m. UTC
A couple of tweaks to the arm64 entry code to avoid loading the shadow
call stack pointer in a way that could potentially be unsafe in the
context of ROP attacks.

Cc: Sami Tolvanen <samitolvanen@google.com>
Cc: Kees Cook <keescook@chromium.org>

Ard Biesheuvel (2):
  arm64: Always load shadow stack pointer directly from the task struct
  arm64: Stash shadow stack pointer in the task struct on interrupt

 arch/arm64/include/asm/scs.h |  7 ++++---
 arch/arm64/kernel/entry.S    | 16 +++++++---------
 arch/arm64/kernel/head.S     |  2 +-
 3 files changed, 12 insertions(+), 13 deletions(-)