All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] arm64: Dynamic shadow call stack fixes
@ 2024-11-06 18:55 Ard Biesheuvel
  2024-11-06 18:55 ` [PATCH 1/3] arm64/scs: Fix handling of DWARF augmentation data in CIE/FDE frames Ard Biesheuvel
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Ard Biesheuvel @ 2024-11-06 18:55 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: catalin.marinas, will, mark.rutland, Ard Biesheuvel,
	Sami Tolvanen, Kees Cook, Nathan Chancellor

From: Ard Biesheuvel <ardb@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@google.com>
Cc: Kees Cook <kees@kernel.org>
Cc: Nathan Chancellor <nathan@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



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-11-08 17:10 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-06 18:55 [PATCH 0/3] arm64: Dynamic shadow call stack fixes Ard Biesheuvel
2024-11-06 18:55 ` [PATCH 1/3] arm64/scs: Fix handling of DWARF augmentation data in CIE/FDE frames Ard Biesheuvel
2024-11-06 22:13   ` Sami Tolvanen
2024-11-08 14:14     ` Ard Biesheuvel
2024-11-06 18:55 ` [PATCH 2/3] arm64/scs: Deal with 64-bit relative offsets in FDE frames Ard Biesheuvel
2024-11-06 18:55 ` [PATCH 3/3] arm64/scs: Drop unused prototype __pi_scs_patch_vmlinux() Ard Biesheuvel
2024-11-06 22:13 ` [PATCH 0/3] arm64: Dynamic shadow call stack fixes Sami Tolvanen
2024-11-08 16:50 ` Catalin Marinas

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.