[llvm-branch-commits] [AArch64] Remove usage of PostRAScheduler (PR #92871)

2024-05-21 Thread Anton Korobeynikov via llvm-branch-commits
https://github.com/asl requested changes to this pull request. Submit your PRs to `main` branch https://github.com/llvm/llvm-project/pull/92871 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

[llvm-branch-commits] [clang] [clang] Implement pointer authentication for C++ virtual functions, v-tables, and VTTs (PR #94056)

2024-06-03 Thread Anton Korobeynikov via llvm-branch-commits
@@ -1261,6 +1262,10 @@ class ASTContext : public RefCountedBase { /// space. QualType removeAddrSpaceQualType(QualType T) const; + /// Return the "other" type-specific discriminator for the given type. asl wrote: The comment here looks a bit misleading w

[llvm-branch-commits] [clang] [clang] Define ptrauth_sign_constant builtin. (PR #93904)

2024-06-03 Thread Anton Korobeynikov via llvm-branch-commits
@@ -0,0 +1,20 @@ +// RUN: %clang_cc1 -triple arm64-apple-ios -fptrauth-intrinsics -emit-llvm %s -o - | FileCheck %s asl wrote: @kovdan01 If you're having a RUN line locally, can you just suggest a change here? https://github.com/llvm/llvm-project/pull/93904 _

[llvm-branch-commits] [clang] [clang] Define ptrauth_string_discriminator builtin. (PR #93903)

2024-06-03 Thread Anton Korobeynikov via llvm-branch-commits
https://github.com/asl commented: See mostly code style nits above https://github.com/llvm/llvm-project/pull/93903 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commi

[llvm-branch-commits] [clang] [clang] Define ptrauth_string_discriminator builtin. (PR #93903)

2024-06-03 Thread Anton Korobeynikov via llvm-branch-commits
https://github.com/asl edited https://github.com/llvm/llvm-project/pull/93903 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [clang] [clang] Define ptrauth_string_discriminator builtin. (PR #93903)

2024-06-03 Thread Anton Korobeynikov via llvm-branch-commits
@@ -2156,6 +2156,24 @@ static ExprResult PointerAuthAuthAndResign(Sema &S, CallExpr *Call) { return Call; } +static ExprResult PointerAuthStringDiscriminator(Sema &S, CallExpr *call) { asl wrote: ```suggestion static ExprResult PointerAuthStringDiscriminat

[llvm-branch-commits] [clang] [clang] Define ptrauth_string_discriminator builtin. (PR #93903)

2024-06-03 Thread Anton Korobeynikov via llvm-branch-commits
@@ -2156,6 +2156,24 @@ static ExprResult PointerAuthAuthAndResign(Sema &S, CallExpr *Call) { return Call; } +static ExprResult PointerAuthStringDiscriminator(Sema &S, CallExpr *call) { + if (checkPointerAuthEnabled(S, call)) return ExprError(); + + // We've already perfor

[llvm-branch-commits] [clang] [clang] Define ptrauth_string_discriminator builtin. (PR #93903)

2024-06-03 Thread Anton Korobeynikov via llvm-branch-commits
@@ -2156,6 +2156,24 @@ static ExprResult PointerAuthAuthAndResign(Sema &S, CallExpr *Call) { return Call; } +static ExprResult PointerAuthStringDiscriminator(Sema &S, CallExpr *call) { + if (checkPointerAuthEnabled(S, call)) return ExprError(); asl wrote:

[llvm-branch-commits] [clang] [clang] Define ptrauth_string_discriminator builtin. (PR #93903)

2024-06-03 Thread Anton Korobeynikov via llvm-branch-commits
@@ -2156,6 +2156,24 @@ static ExprResult PointerAuthAuthAndResign(Sema &S, CallExpr *Call) { return Call; } +static ExprResult PointerAuthStringDiscriminator(Sema &S, CallExpr *call) { + if (checkPointerAuthEnabled(S, call)) return ExprError(); + + // We've already perfor

[llvm-branch-commits] [clang] [clang] Define ptrauth_string_discriminator builtin. (PR #93903)

2024-06-03 Thread Anton Korobeynikov via llvm-branch-commits
@@ -2156,6 +2156,24 @@ static ExprResult PointerAuthAuthAndResign(Sema &S, CallExpr *Call) { return Call; } +static ExprResult PointerAuthStringDiscriminator(Sema &S, CallExpr *call) { + if (checkPointerAuthEnabled(S, call)) return ExprError(); + + // We've already perfor

[llvm-branch-commits] [clang] [clang] Define ptrauth_string_discriminator builtin. (PR #93903)

2024-06-03 Thread Anton Korobeynikov via llvm-branch-commits
@@ -2156,6 +2156,24 @@ static ExprResult PointerAuthAuthAndResign(Sema &S, CallExpr *Call) { return Call; } +static ExprResult PointerAuthStringDiscriminator(Sema &S, CallExpr *call) { + if (checkPointerAuthEnabled(S, call)) return ExprError(); + + // We've already perfor

[llvm-branch-commits] [clang] [clang] Define ptrauth_string_discriminator builtin. (PR #93903)

2024-06-03 Thread Anton Korobeynikov via llvm-branch-commits
@@ -2156,6 +2156,24 @@ static ExprResult PointerAuthAuthAndResign(Sema &S, CallExpr *Call) { return Call; } +static ExprResult PointerAuthStringDiscriminator(Sema &S, CallExpr *call) { + if (checkPointerAuthEnabled(S, call)) return ExprError(); + + // We've already perfor

[llvm-branch-commits] [clang] [clang] Define ptrauth_string_discriminator builtin. (PR #93903)

2024-06-03 Thread Anton Korobeynikov via llvm-branch-commits
@@ -2156,6 +2156,24 @@ static ExprResult PointerAuthAuthAndResign(Sema &S, CallExpr *Call) { return Call; } +static ExprResult PointerAuthStringDiscriminator(Sema &S, CallExpr *call) { + if (checkPointerAuthEnabled(S, call)) return ExprError(); + + // We've already perfor

[llvm-branch-commits] [clang] [clang] Define ptrauth_sign_constant builtin. (PR #93904)

2024-06-03 Thread Anton Korobeynikov via llvm-branch-commits
@@ -2126,14 +2219,16 @@ static ExprResult PointerAuthSignGenericData(Sema &S, CallExpr *Call) { } static ExprResult PointerAuthSignOrAuth(Sema &S, CallExpr *Call, -PointerAuthOpKind OpKind) { +Poi

[llvm-branch-commits] [clang] [clang] Define ptrauth_sign_constant builtin. (PR #93904)

2024-06-03 Thread Anton Korobeynikov via llvm-branch-commits
https://github.com/asl edited https://github.com/llvm/llvm-project/pull/93904 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [clang] [clang] Define ptrauth_sign_constant builtin. (PR #93904)

2024-06-07 Thread Anton Korobeynikov via llvm-branch-commits
@@ -2126,14 +2219,16 @@ static ExprResult PointerAuthSignGenericData(Sema &S, CallExpr *Call) { } static ExprResult PointerAuthSignOrAuth(Sema &S, CallExpr *Call, -PointerAuthOpKind OpKind) { +Poi

[llvm-branch-commits] [clang] [clang] Implement pointer authentication for C++ virtual functions, v-tables, and VTTs (PR #94056)

2024-06-07 Thread Anton Korobeynikov via llvm-branch-commits
@@ -1261,6 +1262,10 @@ class ASTContext : public RefCountedBase { /// space. QualType removeAddrSpaceQualType(QualType T) const; + /// Return the "other" type-specific discriminator for the given type. asl wrote: @ojhunt This looks much better, thanks!

[llvm-branch-commits] [llvm] [Support] Add SipHash-based 16-bit ptrauth stable hash. (PR #93902)

2024-06-07 Thread Anton Korobeynikov via llvm-branch-commits
https://github.com/asl approved this pull request. https://github.com/llvm/llvm-project/pull/93902 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] [Support] Integrate SipHash.cpp into libSupport. (PR #94394)

2024-06-07 Thread Anton Korobeynikov via llvm-branch-commits
asl wrote: So, regarding big-endian things. Original siphash is always "little-endian" regardless of the host platform. On big endian hosts it essentially does byte swap in the end. We do not have it here, so we will end with different hashes on platforms with different endianness. >From the

[llvm-branch-commits] [clang] [llvm] [clang] Define ptrauth_string_discriminator builtin. (PR #93903)

2024-06-07 Thread Anton Korobeynikov via llvm-branch-commits
@@ -15,6 +15,29 @@ typedef enum { ptrauth_key_asib = 1, ptrauth_key_asda = 2, ptrauth_key_asdb = 3, + +#ifdef __APPLE__ asl wrote: Looks like this is something from already merged commit. Worth rebasing? https://github.com/llvm/llvm-project/pull/93903 _

[llvm-branch-commits] [clang] [llvm] [clang] Define ptrauth_string_discriminator builtin. (PR #93903)

2024-06-07 Thread Anton Korobeynikov via llvm-branch-commits
@@ -47,6 +47,17 @@ void test_blend_discriminator(int *dp, int (*fp)(int), int value) { float *mismatch = __builtin_ptrauth_blend_discriminator(dp, value); // expected-error {{incompatible integer to pointer conversion initializing 'float *' with an expression of type}} }

[llvm-branch-commits] [clang] [llvm] [clang] Define ptrauth_string_discriminator builtin. (PR #93903)

2024-06-07 Thread Anton Korobeynikov via llvm-branch-commits
https://github.com/asl edited https://github.com/llvm/llvm-project/pull/93903 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [clang] [clang] Implement pointer authentication for C++ virtual functions, v-tables, and VTTs (PR #94056)

2024-06-07 Thread Anton Korobeynikov via llvm-branch-commits
@@ -162,20 +162,27 @@ struct ThunkInfo { /// Holds a pointer to the overridden method this thunk is for, /// if needed by the ABI to distinguish different thunks with equal - /// adjustments. Otherwise, null. + /// adjustments. + /// In the Itanium ABI, this field can h

[llvm-branch-commits] [clang] [clang] Implement pointer authentication for C++ virtual functions, v-tables, and VTTs (PR #94056)

2024-06-07 Thread Anton Korobeynikov via llvm-branch-commits
@@ -3088,6 +3089,17 @@ QualType ASTContext::removeAddrSpaceQualType(QualType T) const { return QualType(TypeNode, Quals.getFastQualifiers()); } +uint16_t ASTContext::getPointerAuthVTablePointerDiscriminator( +const CXXRecordDecl *record) { + assert(record->isPolymorp

[llvm-branch-commits] [clang] [clang] Implement pointer authentication for C++ virtual functions, v-tables, and VTTs (PR #94056)

2024-06-07 Thread Anton Korobeynikov via llvm-branch-commits
@@ -7037,8 +7036,64 @@ void ItaniumMangleContextImpl::mangleCXXDtorComdat(const CXXDestructorDecl *D, Mangler.mangle(GlobalDecl(D, Dtor_Comdat)); } +static void mangleOverrideDiscrimination(CXXNameMangler &mangler, + ASTContext &conte

[llvm-branch-commits] [clang] [clang] Implement pointer authentication for C++ virtual functions, v-tables, and VTTs (PR #94056)

2024-06-07 Thread Anton Korobeynikov via llvm-branch-commits
@@ -7064,21 +7119,29 @@ void ItaniumMangleContextImpl::mangleThunk(const CXXMethodDecl *MD, Thunk.Return.Virtual.Itanium.VBaseOffsetOffset); Mangler.mangleFunctionEncoding(MD); + if (!elideOverrideInfo) { +mangleOverrideDiscrimination(Mangl

[llvm-branch-commits] [clang] [clang] Implement pointer authentication for C++ virtual functions, v-tables, and VTTs (PR #94056)

2024-06-07 Thread Anton Korobeynikov via llvm-branch-commits
https://github.com/asl edited https://github.com/llvm/llvm-project/pull/94056 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [clang] [clang] Implement pointer authentication for C++ virtual functions, v-tables, and VTTs (PR #94056)

2024-06-07 Thread Anton Korobeynikov via llvm-branch-commits
@@ -3094,9 +3188,10 @@ void VFTableBuilder::AddMethods(BaseSubobject Base, unsigned BaseDepth, ReturnAdjustmentOffset.VirtualBase); } } - +auto thisType = (OverriddenMD ? OverriddenMD : MD)->getThisType().getTypePtr(); ---

[llvm-branch-commits] [clang] [clang] Implement pointer authentication for C++ virtual functions, v-tables, and VTTs (PR #94056)

2024-06-07 Thread Anton Korobeynikov via llvm-branch-commits
@@ -3094,9 +3188,10 @@ void VFTableBuilder::AddMethods(BaseSubobject Base, unsigned BaseDepth, ReturnAdjustmentOffset.VirtualBase); } } - +auto thisType = (OverriddenMD ? OverriddenMD : MD)->getThisType().getTypePtr(); Ad

[llvm-branch-commits] [clang] [clang] Implement pointer authentication for C++ virtual functions, v-tables, and VTTs (PR #94056)

2024-06-07 Thread Anton Korobeynikov via llvm-branch-commits
@@ -2588,6 +2588,12 @@ void CodeGenFunction::InitializeVTablePointer(const VPtr &Vptr) { // the same addr space. Note that this might not be LLVM address space 0. VTableField = VTableField.withElementType(PtrTy); + if (auto authenticationInfo = CGM.getVTablePointerAuthIn

[llvm-branch-commits] [clang] [clang] Implement pointer authentication for C++ virtual functions, v-tables, and VTTs (PR #94056)

2024-06-07 Thread Anton Korobeynikov via llvm-branch-commits
https://github.com/asl edited https://github.com/llvm/llvm-project/pull/94056 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [clang] [clang] Implement pointer authentication for C++ virtual functions, v-tables, and VTTs (PR #94056)

2024-06-07 Thread Anton Korobeynikov via llvm-branch-commits
@@ -2588,6 +2588,12 @@ void CodeGenFunction::InitializeVTablePointer(const VPtr &Vptr) { // the same addr space. Note that this might not be LLVM address space 0. VTableField = VTableField.withElementType(PtrTy); + if (auto authenticationInfo = CGM.getVTablePointerAuthIn

[llvm-branch-commits] [clang] [clang] Implement pointer authentication for C++ virtual functions, v-tables, and VTTs (PR #94056)

2024-06-07 Thread Anton Korobeynikov via llvm-branch-commits
@@ -2681,12 +2687,35 @@ void CodeGenFunction::InitializeVTablePointers(const CXXRecordDecl *RD) { llvm::Value *CodeGenFunction::GetVTablePtr(Address This, llvm::Type *VTableTy, - const CXXRec

[llvm-branch-commits] [clang] [clang] Implement pointer authentication for C++ virtual functions, v-tables, and VTTs (PR #94056)

2024-06-07 Thread Anton Korobeynikov via llvm-branch-commits
@@ -2681,12 +2687,35 @@ void CodeGenFunction::InitializeVTablePointers(const CXXRecordDecl *RD) { llvm::Value *CodeGenFunction::GetVTablePtr(Address This, llvm::Type *VTableTy, - const CXXRec

[llvm-branch-commits] [clang] [clang] Implement pointer authentication for C++ virtual functions, v-tables, and VTTs (PR #94056)

2024-06-07 Thread Anton Korobeynikov via llvm-branch-commits
@@ -2681,12 +2687,35 @@ void CodeGenFunction::InitializeVTablePointers(const CXXRecordDecl *RD) { llvm::Value *CodeGenFunction::GetVTablePtr(Address This, llvm::Type *VTableTy, - const CXXRec

[llvm-branch-commits] [clang] [clang] Implement pointer authentication for C++ virtual functions, v-tables, and VTTs (PR #94056)

2024-06-07 Thread Anton Korobeynikov via llvm-branch-commits
@@ -2681,12 +2687,35 @@ void CodeGenFunction::InitializeVTablePointers(const CXXRecordDecl *RD) { llvm::Value *CodeGenFunction::GetVTablePtr(Address This, llvm::Type *VTableTy, - const CXXRec

[llvm-branch-commits] [clang] [clang] Implement pointer authentication for C++ virtual functions, v-tables, and VTTs (PR #94056)

2024-06-07 Thread Anton Korobeynikov via llvm-branch-commits
@@ -2681,12 +2687,35 @@ void CodeGenFunction::InitializeVTablePointers(const CXXRecordDecl *RD) { llvm::Value *CodeGenFunction::GetVTablePtr(Address This, llvm::Type *VTableTy, - const CXXRec

[llvm-branch-commits] [clang] [clang] Implement pointer authentication for C++ virtual functions, v-tables, and VTTs (PR #94056)

2024-06-07 Thread Anton Korobeynikov via llvm-branch-commits
@@ -803,6 +803,14 @@ bool ConstStructBuilder::Build(const APValue &Val, const RecordDecl *RD, llvm::Constant *VTableAddressPoint = CGM.getCXXABI().getVTableAddressPoint(BaseSubobject(CD, Offset), VTableClass); +

[llvm-branch-commits] [clang] [clang] Implement pointer authentication for C++ virtual functions, v-tables, and VTTs (PR #94056)

2024-06-07 Thread Anton Korobeynikov via llvm-branch-commits
@@ -803,6 +803,14 @@ bool ConstStructBuilder::Build(const APValue &Val, const RecordDecl *RD, llvm::Constant *VTableAddressPoint = CGM.getCXXABI().getVTableAddressPoint(BaseSubobject(CD, Offset), VTableClass); +

[llvm-branch-commits] [clang] [clang] Implement pointer authentication for C++ virtual functions, v-tables, and VTTs (PR #94056)

2024-06-07 Thread Anton Korobeynikov via llvm-branch-commits
@@ -23,11 +23,53 @@ #include "llvm/ADT/DenseMap.h" #include "llvm/IR/ValueMap.h" #include "llvm/Analysis/ValueTracking.h" +#include "llvm/Support/SipHash.h" #include using namespace clang; using namespace CodeGen; +/// Given a pointer-authentication schema, return a con

[llvm-branch-commits] [clang] [clang] Implement pointer authentication for C++ virtual functions, v-tables, and VTTs (PR #94056)

2024-06-07 Thread Anton Korobeynikov via llvm-branch-commits
@@ -90,6 +90,11 @@ CodeGenVTables::EmitVTTDefinition(llvm::GlobalVariable *VTT, llvm::Constant *Init = llvm::ConstantExpr::getGetElementPtr( VTable->getValueType(), VTable, Idxs, /*InBounds=*/true, InRange); + if (auto &schema = asl wrote: `

[llvm-branch-commits] [clang] [clang] Implement pointer authentication for C++ virtual functions, v-tables, and VTTs (PR #94056)

2024-06-07 Thread Anton Korobeynikov via llvm-branch-commits
@@ -90,6 +90,11 @@ CodeGenVTables::EmitVTTDefinition(llvm::GlobalVariable *VTT, llvm::Constant *Init = llvm::ConstantExpr::getGetElementPtr( VTable->getValueType(), VTable, Idxs, /*InBounds=*/true, InRange); + if (auto &schema = + CGM.getCodeGenOp

[llvm-branch-commits] [clang] [clang] Implement pointer authentication for C++ virtual functions, v-tables, and VTTs (PR #94056)

2024-06-07 Thread Anton Korobeynikov via llvm-branch-commits
@@ -219,8 +219,10 @@ CodeGenFunction::GenerateVarArgsThunk(llvm::Function *Fn, "Store of this should be in entry block?"); // Adjust "this", if necessary. Builder.SetInsertPoint(&*ThisStore); - llvm::Value *AdjustedThisPtr = - CGM.getCXXABI().performThisAdjus

[llvm-branch-commits] [clang] [clang] Implement pointer authentication for C++ virtual functions, v-tables, and VTTs (PR #94056)

2024-06-07 Thread Anton Korobeynikov via llvm-branch-commits
@@ -219,8 +219,10 @@ CodeGenFunction::GenerateVarArgsThunk(llvm::Function *Fn, "Store of this should be in entry block?"); // Adjust "this", if necessary. Builder.SetInsertPoint(&*ThisStore); - llvm::Value *AdjustedThisPtr = - CGM.getCXXABI().performThisAdjus

[llvm-branch-commits] [clang] [clang] Implement pointer authentication for C++ virtual functions, v-tables, and VTTs (PR #94056)

2024-06-07 Thread Anton Korobeynikov via llvm-branch-commits
@@ -307,10 +309,15 @@ void CodeGenFunction::EmitCallAndReturnForThunk(llvm::FunctionCallee Callee, const CXXMethodDecl *MD = cast(CurGD.getDecl()); // Adjust the 'this' pointer if necessary + const CXXRecordDecl *thisValueClass = asl wrote: ```suggestio

[llvm-branch-commits] [clang] [clang] Implement pointer authentication for C++ virtual functions, v-tables, and VTTs (PR #94056)

2024-06-07 Thread Anton Korobeynikov via llvm-branch-commits
@@ -307,10 +309,15 @@ void CodeGenFunction::EmitCallAndReturnForThunk(llvm::FunctionCallee Callee, const CXXMethodDecl *MD = cast(CurGD.getDecl()); // Adjust the 'this' pointer if necessary + const CXXRecordDecl *thisValueClass = + MD->getThisType()->getPointeeCXXRe

[llvm-branch-commits] [clang] [clang] Implement pointer authentication for C++ virtual functions, v-tables, and VTTs (PR #94056)

2024-06-07 Thread Anton Korobeynikov via llvm-branch-commits
@@ -307,10 +309,15 @@ void CodeGenFunction::EmitCallAndReturnForThunk(llvm::FunctionCallee Callee, const CXXMethodDecl *MD = cast(CurGD.getDecl()); // Adjust the 'this' pointer if necessary + const CXXRecordDecl *thisValueClass = + MD->getThisType()->getPointeeCXXRe

[llvm-branch-commits] [clang] [clang] Implement pointer authentication for C++ virtual functions, v-tables, and VTTs (PR #94056)

2024-06-08 Thread Anton Korobeynikov via llvm-branch-commits
@@ -841,6 +866,9 @@ void CodeGenVTables::addVTableComponent(ConstantArrayBuilder &builder, if (FnAS != GVAS) fnPtr = llvm::ConstantExpr::getAddrSpaceCast(fnPtr, CGM.GlobalsInt8PtrTy); + if (auto &schema = asl wrote: ```suggestio

[llvm-branch-commits] [clang] [clang] Implement pointer authentication for C++ virtual functions, v-tables, and VTTs (PR #94056)

2024-06-08 Thread Anton Korobeynikov via llvm-branch-commits
@@ -841,6 +866,9 @@ void CodeGenVTables::addVTableComponent(ConstantArrayBuilder &builder, if (FnAS != GVAS) fnPtr = llvm::ConstantExpr::getAddrSpaceCast(fnPtr, CGM.GlobalsInt8PtrTy); + if (auto &schema = + CGM.getCodeGenOpts().PointerAu

[llvm-branch-commits] [clang] [clang] Implement pointer authentication for C++ virtual functions, v-tables, and VTTs (PR #94056)

2024-06-08 Thread Anton Korobeynikov via llvm-branch-commits
https://github.com/asl edited https://github.com/llvm/llvm-project/pull/94056 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [clang] [clang] Implement pointer authentication for C++ virtual functions, v-tables, and VTTs (PR #94056)

2024-06-08 Thread Anton Korobeynikov via llvm-branch-commits
@@ -3063,3 +3063,66 @@ void CodeGenFunction::EmitPointerAuthOperandBundle( llvm::Value *args[] = {key, discriminator}; bundles.emplace_back("ptrauth", args); } + +static llvm::Value *EmitPointerAuthCommon(CodeGenFunction &CGF, asl wrote: ditto about code s

[llvm-branch-commits] [clang] [clang] Implement pointer authentication for C++ virtual functions, v-tables, and VTTs (PR #94056)

2024-06-08 Thread Anton Korobeynikov via llvm-branch-commits
@@ -2456,10 +2456,20 @@ class CodeGenFunction : public CodeGenTypeCache { void InitializeVTablePointers(const CXXRecordDecl *ClassDecl); + // VTableTrapMode - whether we guarantee that loading the + // vtable is guaranteed to trap on authentication failure, + // even if

[llvm-branch-commits] [clang] [clang] Implement pointer authentication for C++ virtual functions, v-tables, and VTTs (PR #94056)

2024-06-08 Thread Anton Korobeynikov via llvm-branch-commits
@@ -4406,10 +4416,19 @@ class CodeGenFunction : public CodeGenTypeCache { } bool isPointerKnownNonNull(const Expr *E); + + /// Create the discriminator from the storage address and the entity hash. + llvm::Value *EmitPointerAuthBlendDiscriminator(llvm::Value *storageAddr

[llvm-branch-commits] [clang] [clang] Implement pointer authentication for C++ virtual functions, v-tables, and VTTs (PR #94056)

2024-06-08 Thread Anton Korobeynikov via llvm-branch-commits
@@ -4406,10 +4416,19 @@ class CodeGenFunction : public CodeGenTypeCache { } bool isPointerKnownNonNull(const Expr *E); + + /// Create the discriminator from the storage address and the entity hash. + llvm::Value *EmitPointerAuthBlendDiscriminator(llvm::Value *storageAddr

[llvm-branch-commits] [clang] [clang] Implement pointer authentication for C++ virtual functions, v-tables, and VTTs (PR #94056)

2024-06-10 Thread Anton Korobeynikov via llvm-branch-commits
asl wrote: > @asl It would be nice if you submit the next round of review as a single > review, instead of 29 individual comments. Oh, strange. I thought it was a single review... https://github.com/llvm/llvm-project/pull/94056 ___ llvm-branch-commit

[llvm-branch-commits] [llvm] [Support] Integrate SipHash.cpp into libSupport. (PR #94394)

2024-06-10 Thread Anton Korobeynikov via llvm-branch-commits
@@ -1,185 +1,149 @@ -/* - SipHash reference C implementation - - Copyright (c) 2012-2022 Jean-Philippe Aumasson - - Copyright (c) 2012-2014 Daniel J. Bernstein - - To the extent possible under law, the author(s) have dedicated all copyright - and related and neighbor

[llvm-branch-commits] [llvm] [Support] Integrate SipHash.cpp into libSupport. (PR #94394)

2024-06-10 Thread Anton Korobeynikov via llvm-branch-commits
@@ -1,185 +1,149 @@ -/* - SipHash reference C implementation - - Copyright (c) 2012-2022 Jean-Philippe Aumasson - - Copyright (c) 2012-2014 Daniel J. Bernstein - - To the extent possible under law, the author(s) have dedicated all copyright - and related and neighbor

[llvm-branch-commits] [llvm] [Support] Integrate SipHash.cpp into libSupport. (PR #94394)

2024-06-10 Thread Anton Korobeynikov via llvm-branch-commits
@@ -1,185 +1,149 @@ -/* - SipHash reference C implementation - - Copyright (c) 2012-2022 Jean-Philippe Aumasson - - Copyright (c) 2012-2014 Daniel J. Bernstein - - To the extent possible under law, the author(s) have dedicated all copyright - and related and neighbor

[llvm-branch-commits] [llvm] [Support] Integrate SipHash.cpp into libSupport. (PR #94394)

2024-06-11 Thread Anton Korobeynikov via llvm-branch-commits
asl wrote: @ahmedbougacha Anything left here? I think it is good to go after the two changes mentioned above. We can deal with cross-endian things afterwards as soon as we will have tests & buildbots https://github.com/llvm/llvm-project/pull/94394

[llvm-branch-commits] [clang] [clang] Implement function pointer signing and authenticated function calls (PR #93906)

2024-06-12 Thread Anton Korobeynikov via llvm-branch-commits
asl wrote: @ahatanak Looks like there are some conflicts that should be resolved https://github.com/llvm/llvm-project/pull/93906 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llv

[llvm-branch-commits] [llvm] [Support] Integrate SipHash.cpp into libSupport. (PR #94394)

2024-06-12 Thread Anton Korobeynikov via llvm-branch-commits
asl wrote: @kbeyls There are (some) tests in the follow-up commit https://github.com/llvm/llvm-project/pull/93902/files#diff-8df159460fc7a128734566054df883f3192b1b261dc8eac667933b4042e9af5f https://github.com/llvm/llvm-project/pull/94394 ___ llvm-bran

[llvm-branch-commits] [llvm] [Support] Integrate SipHash.cpp into libSupport. (PR #94394)

2024-06-14 Thread Anton Korobeynikov via llvm-branch-commits
https://github.com/asl approved this pull request. +1 https://github.com/llvm/llvm-project/pull/94394 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [clang] [clang] Implement pointer authentication for C++ virtual functions, v-tables, and VTTs (PR #94056)

2024-06-19 Thread Anton Korobeynikov via llvm-branch-commits
https://github.com/asl approved this pull request. Thanks! https://github.com/llvm/llvm-project/pull/94056 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [clang] [clang] Implement pointer authentication for C++ virtual functions, v-tables, and VTTs (PR #94056)

2024-06-20 Thread Anton Korobeynikov via llvm-branch-commits
@@ -296,3 +296,21 @@ ConstantAggregateBuilderBase::finishStruct(llvm::StructType *ty) { buffer.erase(buffer.begin() + Begin, buffer.end()); return constant; } + asl wrote: Yeah, LGTM! https://github.com/llvm/llvm-project/pull/94056 __

[llvm-branch-commits] [clang] release/19.x: [PAC][clang] Enable `-fptrauth-indirect-gotos` as part of pauthtest ABI (#100480) (PR #100484)

2024-07-24 Thread Anton Korobeynikov via llvm-branch-commits
https://github.com/asl approved this pull request. https://github.com/llvm/llvm-project/pull/100484 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] release/19.x: [PAC] Sign LR with B key for non-leaf functions with ptrauth-returns attr (#100552) (PR #100716)

2024-07-26 Thread Anton Korobeynikov via llvm-branch-commits
https://github.com/asl approved this pull request. https://github.com/llvm/llvm-project/pull/100716 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [clang] release/19.x: [PAC][clang][test] Implement missing tests for some PAuth features (#100206) (PR #101044)

2024-07-29 Thread Anton Korobeynikov via llvm-branch-commits
https://github.com/asl approved this pull request. https://github.com/llvm/llvm-project/pull/101044 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] release/19.x: [PAC][test] Add tests against Linux triples for auth/resign lowering (#100744) (PR #101043)

2024-07-29 Thread Anton Korobeynikov via llvm-branch-commits
https://github.com/asl approved this pull request. https://github.com/llvm/llvm-project/pull/101043 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [clang] release/19.x: [clang] Wire -fptrauth-returns to "ptrauth-returns" fn attribute. (#102416) (PR #102670)

2024-08-09 Thread Anton Korobeynikov via llvm-branch-commits
https://github.com/asl approved this pull request. This is one of two small frontend changes require to close the chain of changes required for end-to-end support of pointer authentication in LLVM 19. The change does not affect any other target and essentially just propagate command line optio

Re: [llvm-branch-commits] [llvm-branch] r275828 - Creating release_39 branch off revision 275826

2016-08-11 Thread Anton Korobeynikov via llvm-branch-commits
Should be there - I kicked the updates for all the repos. Note that in general the branches will be created with the first commit to trunk after the branch point. On Mon, Jul 18, 2016 at 9:32 PM, Anton Korobeynikov wrote: > Yep, doing this right now :) > > On Mon, Jul 18, 2016 at 9:29 PM, Hans W

Re: [llvm-branch-commits] [llvm-branch] r275828 - Creating release_39 branch off revision 275826

2016-08-11 Thread Anton Korobeynikov via llvm-branch-commits
Yep, doing this right now :) On Mon, Jul 18, 2016 at 9:29 PM, Hans Wennborg wrote: > Hi Anton, > > On Mon, Jul 18, 2016 at 10:52 AM, Hans Wennborg via > llvm-branch-commits wrote: >> Author: hans >> Date: Mon Jul 18 12:52:41 2016 >> New Revision: 275828 >> >> URL: http://llvm.org/viewvc/llvm-pro

Re: [llvm-branch-commits] [llvm-branch] r291816 - Creating release_40 branch off revision 291814

2017-01-12 Thread Anton Korobeynikov via llvm-branch-commits
Sure, will do. On Thu, Jan 12, 2017 at 3:13 PM, Hans Wennborg wrote: > Hi Anton, > > On Thu, Jan 12, 2017 at 1:25 PM, Hans Wennborg via llvm-branch-commits > wrote: >> Author: hans >> Date: Thu Jan 12 15:25:21 2017 >> New Revision: 291816 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=291816

Re: [llvm-branch-commits] [llvm-branch] r291816 - Creating release_40 branch off revision 291814

2017-01-13 Thread Anton Korobeynikov via llvm-branch-commits
Should appear after first commit. On Thu, Jan 12, 2017 at 3:22 PM, Anton Korobeynikov wrote: > Sure, will do. > > On Thu, Jan 12, 2017 at 3:13 PM, Hans Wennborg wrote: >> Hi Anton, >> >> On Thu, Jan 12, 2017 at 1:25 PM, Hans Wennborg via llvm-branch-commits >> wrote: >>> Author: hans >>> Date:

[llvm-branch-commits] [clang] release/19.x: [clang] Implement -fptrauth-auth-traps. (#102417) (PR #102938)

2024-08-12 Thread Anton Korobeynikov via llvm-branch-commits
https://github.com/asl approved this pull request. This is the second change similar to https://github.com/llvm/llvm-project/pull/102670 It is a small frontend change require to close the chain of changes required for end-to-end support of pointer authentication in LLVM 19. The change does no

[llvm-branch-commits] [clang] [llvm] Add some brief LLVM 19 release notes for Pointer Authentication ABI support (PR #104657)

2024-08-16 Thread Anton Korobeynikov via llvm-branch-commits
https://github.com/asl created https://github.com/llvm/llvm-project/pull/104657 None >From 0232f080dce628f473d9ceae599109fe2be0fa11 Mon Sep 17 00:00:00 2001 From: Anton Korobeynikov Date: Fri, 16 Aug 2024 18:09:53 -0700 Subject: [PATCH] Add some brief LLVM 19 release notes for Pointer Authenti

[llvm-branch-commits] [clang] [llvm] Add some brief LLVM 19 release notes for Pointer Authentication ABI support (PR #104657)

2024-08-16 Thread Anton Korobeynikov via llvm-branch-commits
asl wrote: Feel free to add more, I decided to go brief as the documentation is not there yet. Thanks! https://github.com/llvm/llvm-project/pull/104657 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi

[llvm-branch-commits] [clang] [llvm] Add some brief LLVM 19 release notes for Pointer Authentication ABI support (PR #104657)

2024-08-16 Thread Anton Korobeynikov via llvm-branch-commits
https://github.com/asl updated https://github.com/llvm/llvm-project/pull/104657 >From 92c76c04d8a3142ee569fcd705df08e566402b1d Mon Sep 17 00:00:00 2001 From: Anton Korobeynikov Date: Fri, 16 Aug 2024 18:09:53 -0700 Subject: [PATCH] Add some brief LLVM 19 release notes for Pointer Authentication

[llvm-branch-commits] [clang] [llvm] Add some brief LLVM 19 release notes for Pointer Authentication ABI support (PR #104657)

2024-08-16 Thread Anton Korobeynikov via llvm-branch-commits
https://github.com/asl updated https://github.com/llvm/llvm-project/pull/104657 >From a01e5a8d95e48bd195b471ae2e5416531c37663d Mon Sep 17 00:00:00 2001 From: Anton Korobeynikov Date: Fri, 16 Aug 2024 18:09:53 -0700 Subject: [PATCH] Add some brief LLVM 19 release notes for Pointer Authentication

[llvm-branch-commits] [clang] [llvm] Add some brief LLVM 19 release notes for Pointer Authentication ABI support (PR #104657)

2024-08-16 Thread Anton Korobeynikov via llvm-branch-commits
https://github.com/asl updated https://github.com/llvm/llvm-project/pull/104657 >From 4b6c656ca145e15ee59b16c5adb974b4767ec585 Mon Sep 17 00:00:00 2001 From: Anton Korobeynikov Date: Fri, 16 Aug 2024 18:09:53 -0700 Subject: [PATCH] Add some brief LLVM 19 release notes for Pointer Authentication