Skip to content

arm64: Dynamic shadow call stack fixes

Ard Biesheuvel linux-arm-kernel 1 version Applied

Status from this message: Applied to arm64 (for-next/scs), thanks!

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 4 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/3arm64/scs: Fix handling of DWARF augmentation data in CIE/FDE framesarch/arm64/include/asm/scs.h arch/arm64/kernel/module.c arch/arm64/kernel/pi/patch-scs.c+50 -302 replies
2/3arm64/scs: Deal with 64-bit relative offsets in FDE framesarch/arm64/kernel/pi/patch-scs.c+32 -20 replies
3/3arm64/scs: Drop unused prototype __pi_scs_patch_vmlinux()arch/arm64/include/asm/scs.h+0 -10 replies

Reviews trailers per patch

None of the 3 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchSami Tolvanen
SeriesR-b T-b
1/3
2/3
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

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

From: Ard Biesheuvel <[email protected]>

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 <[email protected]>
Cc Kees Cook <[email protected]>
Cc Nathan Chancellor <[email protected]>

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(-)
Signature · 1 line
2.47.0.277.g8800431eea-goog