[PATCH 0/3] arm64: Dynamic shadow call stack fixes

Ard Biesheuvel ardb+git at google.com
Wed Nov 6 10:55:14 PST 2024


From: Ard Biesheuvel <ardb at kernel.org>

When building modules using the large code model, the emitted DWARF
metadata uses large fields for the code references too, and this is
currently not being handled. 

The CIE header frame contains metadata that describes the size of these
fields, and so this should be parsed and taken into account when
processing the FDE frames (patch #2)

But first, the handling of this CIE frame header needs to be fixed, as
it currently [inadvertently] used hardcoded defaults for some values
that happen to always match what Clang emits in practice (patch #1) 

Cc: Sami Tolvanen <samitolvanen at google.com>
Cc: Kees Cook <kees at kernel.org>
Cc: Nathan Chancellor <nathan at kernel.org>

Ard Biesheuvel (3):
  arm64/scs: Fix handling of DWARF augmentation data in CIE/FDE frames
  arm64/scs: Deal with 64-bit relative offsets in FDE frames
  arm64/scs: Drop unused prototype __pi_scs_patch_vmlinux()

 arch/arm64/include/asm/scs.h     |  8 +-
 arch/arm64/kernel/module.c       | 10 ++-
 arch/arm64/kernel/pi/patch-scs.c | 93 ++++++++++++++------
 3 files changed, 80 insertions(+), 31 deletions(-)

-- 
2.47.0.277.g8800431eea-goog




More information about the linux-arm-kernel mailing list