================ @@ -1537,11 +1570,16 @@ static void CollectARMPACBTIOptions(const ToolChain &TC, const ArgList &Args, if (!isAArch64 && PBP.Key == "b_key") D.Diag(diag::warn_unsupported_branch_protection) << "b-key" << A->getAsString(Args); + if (!isAArch64 && PBP.HasPauthABI) + D.Diag(diag::warn_unsupported_branch_protection) + << "pauthabi" << A->getAsString(Args); Scope = PBP.Scope; Key = PBP.Key; BranchProtectionPAuthLR = PBP.BranchProtectionPAuthLR; IndirectBranches = PBP.BranchTargetEnforcement; GuardedControlStack = PBP.GuardedControlStack; + if (isAArch64 && PBP.HasPauthABI) ---------------- smithp35 wrote:
Do we need any additional error checking for the existing branch protection options that affect pointer authentication? For example we have ``` pac-ret // return address signing with A key pac-ret+leaf // extend return address signing to leaf functions standard = pac-ret+bti+pc // enable pac-ret, bti and pc (if available on hardware). pc // Enable pc as modifier in return address signing. b-key // Use b-key for signing return address. ``` When pauthabi is used, are the other PAC related options ignored? I can see `+leaf` being potentially useful, as well as `+pc`. I think b-key is going to clash with the signing schema. The other options look to be subsets of pauthabi (unless additional command line options unless `-fno-ptrauth-returns` is used. https://github.com/llvm/llvm-project/pull/97237 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits