[PATCH 0/3] arm64: Dynamic shadow call stack fixes
Sami Tolvanen
samitolvanen at google.com
Wed Nov 6 14:13:58 PST 2024
Hi Ard,
On Wed, Nov 6, 2024 at 6:55 PM Ard Biesheuvel <ardb+git at google.com> wrote:
>
> 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(-)
I was able to reproduce the issue by building modules with
-mcmodel=large, and I confirmed that this series fixes it. For the
series:
Reviewed-by: Sami Tolvanen <samitolvanen at google.com>
Tested-by: Sami Tolvanen <samitolvanen at google.com>
Sami
More information about the linux-arm-kernel
mailing list