[all-commits] [llvm/llvm-project] b32aac: [libunwind] Add GCS support for AArch64 (#99335)

John Brawn via All-commits all-commits at lists.llvm.org
Sun Aug 4 05:27:33 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b32aac4358c1f6639de7c453656cd74fbab75d71
      https://github.com/llvm/llvm-project/commit/b32aac4358c1f6639de7c453656cd74fbab75d71
  Author: John Brawn <john.brawn at arm.com>
  Date:   2024-08-04 (Sun, 04 Aug 2024)

  Changed paths:
    M libunwind/CMakeLists.txt
    M libunwind/src/Registers.hpp
    M libunwind/src/UnwindCursor.hpp
    M libunwind/src/UnwindLevel1.c
    M libunwind/src/UnwindRegistersRestore.S
    M libunwind/src/cet_unwind.h
    M libunwind/test/CMakeLists.txt
    M libunwind/test/configs/llvm-libunwind-merged.cfg.in
    M libunwind/test/configs/llvm-libunwind-shared.cfg.in
    M libunwind/test/configs/llvm-libunwind-static.cfg.in

  Log Message:
  -----------
  [libunwind] Add GCS support for AArch64 (#99335)

AArch64 GCS (Guarded Control Stack) is similar enough to CET that we can
re-use the existing code that is guarded by _LIBUNWIND_USE_CET, so long
as we also add defines to locate the GCS stack and pop the entries from
it. We also need the jumpto function to exit using br instead of ret, to
prevent it from popping the GCS stack.

GCS support is enabled using the LIBUNWIND_ENABLE_GCS cmake option. This
enables -mbranch-protection=standard, which enables GCS. For the places
we need to use GCS instructions we use the target attribute, as there's
not a command-line option to enable a specific architecture extension.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list