[all-commits] [llvm/llvm-project] 984a77: [PAC] Do not support some values of branch-protect...

Daniil Kovalev via All-commits all-commits at lists.llvm.org
Mon Feb 10 17:32:55 PST 2025


  Branch: refs/heads/release/20.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 984a779b81552a97cbfcb8139ad646a958cf47ce
      https://github.com/llvm/llvm-project/commit/984a779b81552a97cbfcb8139ad646a958cf47ce
  Author: Daniil Kovalev <dkovalev at accesssoftek.com>
  Date:   2025-02-10 (Mon, 10 Feb 2025)

  Changed paths:
    M clang/include/clang/Basic/TargetInfo.h
    M clang/lib/Basic/Targets/AArch64.cpp
    M clang/lib/Basic/Targets/AArch64.h
    M clang/lib/Basic/Targets/ARM.cpp
    M clang/lib/Basic/Targets/ARM.h
    M clang/lib/CodeGen/Targets/AArch64.cpp
    M clang/lib/CodeGen/Targets/ARM.cpp
    M clang/lib/Driver/ToolChains/Clang.cpp
    M clang/lib/Sema/SemaDeclAttr.cpp
    M clang/test/Driver/aarch64-ptrauth.c
    A clang/test/Frontend/aarch64-ignore-branch-protection-attribute.c

  Log Message:
  -----------
  [PAC] Do not support some values of branch-protection with ptrauth-returns (#125280)

This patch does two things.

1. Previously, when checking driver arguments, we emitted an error for
unsupported values of `-mbranch-protection` when using pauthtest ABI.
The reason for that was ptrauth-returns being enabled as part of
pauthtest. This patch changes the check against pauthtest to a check
against ptrauth-returns.

2. Similarly, check against values of the following function attribute
which are unsupported with ptrauth-returns:
`__attribute__((target("branch-protection=XXX`. Note that existing
`validateBranchProtection` function is used, and current behavior is to
ignore the unsupported attribute value, so no error is emitted.

(cherry picked from commit 84b0c128a751acfbf5b439edc724ba27d1da653e)



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