[all-commits] [llvm/llvm-project] 395291: [libunwind] Fix problems caused by combining BTI a...

John Brawn via All-commits all-commits at lists.llvm.org
Thu Aug 8 03:20:30 PDT 2024


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

  Changed paths:
    M libunwind/src/UnwindRegistersRestore.S
    M libunwind/src/assembly.h

  Log Message:
  -----------
  [libunwind] Fix problems caused by combining BTI and GCS (#102322)

The libunwind assembly files need adjustment in order to work correctly
when both BTI and GCS are both enabled (which will be the case when
using -mbranch-protection=standard):
* __libunwind_Registers_arm64_jumpto can't use br to jump to the return
location, instead we need to use gcspush then ret.
* Because we indirectly call __libunwind_Registers_arm64_jumpto it needs
to start with bti jc.
 * We need to set the GCS GNU property bit when it's enabled.

---------

Co-authored-by: Daniel Kiss <daniel.kristof.kiss at gmail.com>



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