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

Daniil Kovalev via All-commits all-commits at lists.llvm.org
Wed Feb 5 00:39:49 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 84b0c128a751acfbf5b439edc724ba27d1da653e
      https://github.com/llvm/llvm-project/commit/84b0c128a751acfbf5b439edc724ba27d1da653e
  Author: Daniil Kovalev <dkovalev at accesssoftek.com>
  Date:   2025-02-05 (Wed, 05 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.



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