[clang] [llvm] [PAC] Fix address discrimination for type info vtable pointers (PR #102199)

2024-08-07 Thread Daniil Kovalev via cfe-commits
@@ -1056,12 +1056,18 @@ class ConstantPtrAuth final : public Constant { return !getAddrDiscriminator()->isNullValue(); } - /// A constant value for the address discriminator which has special - /// significance to ctors/dtors lowering. Regular address discrimination c

[clang] [llvm] [PAC][ELF][AArch64] Encode several ptrauth features in PAuth core info (PR #102508)

2024-08-08 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 created https://github.com/llvm/llvm-project/pull/102508 For llvm_linux platform, define the following meaning for bits 9, 10, 11: - bit 9: set if indirect gotos signing is enabled; - bit 10: set if type info vtable pointer discrimination is enabled; - bit 11: set if

[clang] [llvm] [PAC][ELF][AArch64] Encode several ptrauth features in PAuth core info (PR #102508)

2024-08-08 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 ready_for_review https://github.com/llvm/llvm-project/pull/102508 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PAC][ELF][AArch64] Encode several ptrauth features in PAuth core info (PR #102508)

2024-08-19 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 closed https://github.com/llvm/llvm-project/pull/102508 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [ARM][AArch64] BTI, GCS, PAC Module flag update. (PR #86212)

2024-08-23 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 commented: LGTM in terms of addressing my previous comments, and I also do not have new ones. But I'm not deeply into the context of the patch, so I'd prefer to wait for other reviews on this. https://github.com/llvm/llvm-project/pull/86212 _

[clang] [compiler-rt] [llvm] [PAC][AArch64] Support init/fini array signing (PR #96478)

2024-06-24 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 created https://github.com/llvm/llvm-project/pull/96478 Depends on #96477 If both `-fptrauth-init-fini` and `-fptrauth-calls` are passed, sign function pointers in `llvm.global_ctors` and `llvm.global_dtors` with constant discriminator 0xD9D4 (`ptrauth_string_discr

[clang] [llvm] [PAC][ELF][AArch64] Encode signed GOT flag in PAuth core info (PR #96159)

2024-06-24 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 milestoned https://github.com/llvm/llvm-project/pull/96159 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PAC][clang][Driver] Add signed GOT flag (PR #96160)

2024-06-24 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 milestoned https://github.com/llvm/llvm-project/pull/96160 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [PAC][AArch64] Support init/fini array signing (PR #96478)

2024-06-24 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 updated https://github.com/llvm/llvm-project/pull/96478 >From e5eeab35a842453d97bd2bf8763efa426aead3e8 Mon Sep 17 00:00:00 2001 From: Daniil Kovalev Date: Fri, 21 Jun 2024 12:32:51 +0300 Subject: [PATCH] [PAC][AArch64] Support init/fini array signing If both `-fptra

[clang] [compiler-rt] [llvm] [PAC][AArch64] Support init/fini array signing (PR #96478)

2024-06-24 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 updated https://github.com/llvm/llvm-project/pull/96478 >From 5399237a71c0ccd872821034d83ea2c3a04bed3f Mon Sep 17 00:00:00 2001 From: Daniil Kovalev Date: Fri, 21 Jun 2024 12:32:51 +0300 Subject: [PATCH] [PAC][AArch64] Support init/fini array signing If both `-fptra

[clang] [compiler-rt] [llvm] [PAC][AArch64] Support init/fini array signing (PR #96478)

2024-06-24 Thread Daniil Kovalev via cfe-commits
kovdan01 wrote: > Can we have LLVM IR test as well? I've added llvm/test/CodeGen/AArch64/ptrauth-init-fini.ll, thanks for suggestion. https://github.com/llvm/llvm-project/pull/96478 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

[clang] [compiler-rt] [llvm] [PAC][AArch64] Support init/fini array signing (PR #96478)

2024-06-24 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 ready_for_review https://github.com/llvm/llvm-project/pull/96478 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [PAC][AArch64] Support init/fini array signing (PR #96478)

2024-06-24 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 milestoned https://github.com/llvm/llvm-project/pull/96478 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PAC][ELF][AArch64] Encode signed GOT flag in PAuth core info (PR #96159)

2024-06-27 Thread Daniil Kovalev via cfe-commits
kovdan01 wrote: > I'm not at all familiar with this PAuth stuff, but don't you need a test case > for where the new value is set (currently they all seem to be unset, if I'm > interpreting things correctly)? I'm not sure if I understood your question correctly - particularly, I'm not sure wha

[clang] [llvm] [PAC][ELF][AArch64] Encode signed GOT flag in PAuth core info (PR #96159)

2024-06-27 Thread Daniil Kovalev via cfe-commits
kovdan01 wrote: > I was referring to this line from the description: > > > llvm-readobj: print `PointerAuthELFGOT` or `!PointerAuthELFGOT` in version > > description of llvm_linux platform depending on whether the flag is set. > > In my opinion, if you don't test the first of those two cases,

[clang] [llvm] [PAC][ELF][AArch64] Encode signed GOT flag in PAuth core info (PR #96159)

2024-06-27 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 updated https://github.com/llvm/llvm-project/pull/96159 >From 4eeb1b4e82941681b6cafda8579d136e3e7cb09f Mon Sep 17 00:00:00 2001 From: Daniil Kovalev Date: Tue, 18 Jun 2024 15:37:18 +0300 Subject: [PATCH 1/2] [PAC][ELF][AArch64] Encode signed GOT flag in PAuth core i

[clang] [compiler-rt] [llvm] [PAC][AArch64] Support init/fini array signing (PR #96478)

2024-06-28 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 updated https://github.com/llvm/llvm-project/pull/96478 >From 5399237a71c0ccd872821034d83ea2c3a04bed3f Mon Sep 17 00:00:00 2001 From: Daniil Kovalev Date: Fri, 21 Jun 2024 12:32:51 +0300 Subject: [PATCH 1/2] [PAC][AArch64] Support init/fini array signing If both `-f

[clang] [compiler-rt] [llvm] [PAC][AArch64] Support init/fini array signing (PR #96478)

2024-06-28 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 edited https://github.com/llvm/llvm-project/pull/96478 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [PAC][AArch64] Support init/fini array signing (PR #96478)

2024-06-28 Thread Daniil Kovalev via cfe-commits
kovdan01 wrote: The PR no longer depends on #96477. For signed ctors/dtors we now have special address discrimination handling so we don't need to use self-references to `llvm.global_{c|d}tors` with giant `getelementptr` expressions - such references are disallowed and, as discussed in #96477,

[clang] [compiler-rt] [llvm] [PAC][AArch64] Support init/fini array signing (PR #96478)

2024-06-28 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 edited https://github.com/llvm/llvm-project/pull/96478 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [PAC][AArch64] Support init/fini array signing (PR #96478)

2024-06-28 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 updated https://github.com/llvm/llvm-project/pull/96478 >From 5399237a71c0ccd872821034d83ea2c3a04bed3f Mon Sep 17 00:00:00 2001 From: Daniil Kovalev Date: Fri, 21 Jun 2024 12:32:51 +0300 Subject: [PATCH 1/3] [PAC][AArch64] Support init/fini array signing If both `-f

[clang] [compiler-rt] [llvm] [PAC][AArch64] Support init/fini array signing (PR #96478)

2024-06-28 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 updated https://github.com/llvm/llvm-project/pull/96478 >From 5399237a71c0ccd872821034d83ea2c3a04bed3f Mon Sep 17 00:00:00 2001 From: Daniil Kovalev Date: Fri, 21 Jun 2024 12:32:51 +0300 Subject: [PATCH 1/2] [PAC][AArch64] Support init/fini array signing If both `-f

[clang] [clang] Implement function pointer type discrimination (PR #96992)

2024-06-28 Thread Daniil Kovalev via cfe-commits
@@ -4228,6 +4228,8 @@ defm ptrauth_vtable_pointer_address_discrimination : defm ptrauth_vtable_pointer_type_discrimination : OptInCC1FFlag<"ptrauth-vtable-pointer-type-discrimination", "Enable type discrimination of vtable pointers">; defm ptrauth_init_fini : OptInCC1FFlag<"

[clang] [clang] Implement function pointer type discrimination (PR #96992)

2024-06-28 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 edited https://github.com/llvm/llvm-project/pull/96992 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement function pointer type discrimination (PR #96992)

2024-06-28 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 approved this pull request. LGTM with minor mostly cosmetic comments. I'm OK with fixing them in a separate PR if it's too time-consuming now. https://github.com/llvm/llvm-project/pull/96992 ___ cfe-commits mailing list cfe

[clang] [clang] Implement function pointer type discrimination (PR #96992)

2024-06-28 Thread Daniil Kovalev via cfe-commits
@@ -1283,6 +1283,9 @@ class ASTContext : public RefCountedBase { uint16_t getPointerAuthVTablePointerDiscriminator(const CXXRecordDecl *RD); + /// Return the "other" type-specific discriminator for the given type. + uint16_t getPointerAuthTypeDiscriminator(QualType T); -

[clang] [clang] Implement function pointer type discrimination (PR #96992)

2024-06-28 Thread Daniil Kovalev via cfe-commits
@@ -2220,6 +2220,11 @@ llvm::Constant *ConstantLValueEmitter::emitPointerAuthPointer(const Expr *E) { // The assertions here are all checked by Sema. assert(Result.Val.isLValue()); + auto *Base = Result.Val.getLValueBase().get(); kovdan01 wrote: nit ```

[clang] [clang] Implement function pointer type discrimination (PR #96992)

2024-06-28 Thread Daniil Kovalev via cfe-commits
@@ -3140,6 +3140,269 @@ ASTContext::getPointerAuthVTablePointerDiscriminator(const CXXRecordDecl *RD) { return llvm::getPointerAuthStableSipHash(Str); } +/// Encode a function type for use in the discriminator of a function pointer +/// type. We can't use the itanium scheme

[clang] [clang] Implement function pointer type discrimination (PR #96992)

2024-06-28 Thread Daniil Kovalev via cfe-commits
@@ -470,6 +470,9 @@ ENUM_LANGOPT(StrictFlexArraysLevel, StrictFlexArraysLevelKind, 2, COMPATIBLE_VALUE_LANGOPT(MaxTokens, 32, 0, "Max number of tokens per TU or 0") +BENIGN_LANGOPT(FunctionPointerTypeDiscrimination, 1, 0, kovdan01 wrote: Can we use `LANGOPT

[clang] [clang] Implement function pointer type discrimination (PR #96992)

2024-06-28 Thread Daniil Kovalev via cfe-commits
@@ -3140,6 +3140,269 @@ ASTContext::getPointerAuthVTablePointerDiscriminator(const CXXRecordDecl *RD) { return llvm::getPointerAuthStableSipHash(Str); } +/// Encode a function type for use in the discriminator of a function pointer +/// type. We can't use the itanium scheme

[clang] [clang] Implement function pointer type discrimination (PR #96992)

2024-06-28 Thread Daniil Kovalev via cfe-commits
@@ -5,55 +5,65 @@ // RUN: -fptrauth-vtable-pointer-address-discrimination \ // RUN: -fptrauth-vtable-pointer-type-discrimination \ // RUN: -fptrauth-init-fini | \ -// RUN: FileCheck %s --check-prefixes=INTRIN,CALLS,RETS,VPTR_ADDR_DISCR,VPTR_TYPE_DISCR,INITFINI +// RUN:

[clang] [clang] Implement function pointer type discrimination (PR #96992)

2024-06-28 Thread Daniil Kovalev via cfe-commits
@@ -3140,6 +3140,269 @@ ASTContext::getPointerAuthVTablePointerDiscriminator(const CXXRecordDecl *RD) { return llvm::getPointerAuthStableSipHash(Str); } +/// Encode a function type for use in the discriminator of a function pointer +/// type. We can't use the itanium scheme

[clang] [clang] Implement function pointer type discrimination (PR #96992)

2024-06-28 Thread Daniil Kovalev via cfe-commits
@@ -2220,6 +2220,11 @@ llvm::Constant *ConstantLValueEmitter::emitPointerAuthPointer(const Expr *E) { // The assertions here are all checked by Sema. assert(Result.Val.isLValue()); + auto *Base = Result.Val.getLValueBase().get(); + if (auto *Decl = dyn_cast_or_null(Base

[clang] [clang] Implement function pointer type discrimination (PR #96992)

2024-06-28 Thread Daniil Kovalev via cfe-commits
@@ -3140,6 +3140,269 @@ ASTContext::getPointerAuthVTablePointerDiscriminator(const CXXRecordDecl *RD) { return llvm::getPointerAuthStableSipHash(Str); } +/// Encode a function type for use in the discriminator of a function pointer +/// type. We can't use the itanium scheme

[clang] [clang] Implement function pointer type discrimination (PR #96992)

2024-06-28 Thread Daniil Kovalev via cfe-commits
@@ -4779,6 +4783,9 @@ bool CompilerInvocation::CreateFromArgsImpl( if (Res.getFrontendOpts().ProgramAction == frontend::RewriteObjC) LangOpts.ObjCExceptions = 1; + LangOpts.FunctionPointerTypeDiscrimination = kovdan01 wrote: Can we move this to `ParseP

[clang] [clang] Implement function pointer type discrimination (PR #96992)

2024-06-28 Thread Daniil Kovalev via cfe-commits
@@ -15,6 +15,7 @@ #include "CodeGenModule.h" #include "clang/CodeGen/CodeGenABITypes.h" #include "clang/CodeGen/ConstantInitBuilder.h" +#include "llvm/Analysis/ValueTracking.h" kovdan01 wrote: Is this include needed? https://github.com/llvm/llvm-project/pull/

[clang] [clang] Implement function pointer type discrimination (PR #96992)

2024-06-28 Thread Daniil Kovalev via cfe-commits
@@ -470,6 +470,9 @@ ENUM_LANGOPT(StrictFlexArraysLevel, StrictFlexArraysLevelKind, 2, COMPATIBLE_VALUE_LANGOPT(MaxTokens, 32, 0, "Max number of tokens per TU or 0") +BENIGN_LANGOPT(PointerAuthFunctionTypeDiscrimination, 1, 0, kovdan01 wrote: Can we use `LAN

[clang] [clang] Implement function pointer type discrimination (PR #96992)

2024-06-28 Thread Daniil Kovalev via cfe-commits
@@ -3140,6 +3140,269 @@ ASTContext::getPointerAuthVTablePointerDiscriminator(const CXXRecordDecl *RD) { return llvm::getPointerAuthStableSipHash(Str); } +/// Encode a function type for use in the discriminator of a function pointer +/// type. We can't use the itanium scheme

[clang] [clang] Implement function pointer type discrimination (PR #96992)

2024-06-28 Thread Daniil Kovalev via cfe-commits
@@ -3140,6 +3140,269 @@ ASTContext::getPointerAuthVTablePointerDiscriminator(const CXXRecordDecl *RD) { return llvm::getPointerAuthStableSipHash(Str); } +/// Encode a function type for use in the discriminator of a function pointer +/// type. We can't use the itanium scheme

[clang] [llvm] [PAC] Fix address discrimination for type info vtable pointers (PR #102199)

2024-09-16 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 updated https://github.com/llvm/llvm-project/pull/102199 >From 0c20bcdf35f3c15024986da50cafb2a8c155e3cf Mon Sep 17 00:00:00 2001 From: Daniil Kovalev Date: Tue, 6 Aug 2024 20:48:02 +0300 Subject: [PATCH 1/2] [PAC] Fix address discrimination for type info vtable poin

[clang] [llvm] [PAC] Fix address discrimination for type info vtable pointers (PR #102199)

2024-09-16 Thread Daniil Kovalev via cfe-commits
kovdan01 wrote: @efriedma-quic @ahmedbougacha @ojhunt Would be glad to see your comments after the latest commit 0c20bcdf35f3c15024986da50cafb2a8c155e3cf which introduces using actual storage address instead of 'inttoptr 1' placeholder. https://github.com/llvm/llvm-project/pull/102199

[clang] [llvm] [PAC] Fix address discrimination for type info vtable pointers (PR #102199)

2024-09-16 Thread Daniil Kovalev via cfe-commits
@@ -1056,12 +1056,18 @@ class ConstantPtrAuth final : public Constant { return !getAddrDiscriminator()->isNullValue(); } - /// A constant value for the address discriminator which has special - /// significance to ctors/dtors lowering. Regular address discrimination c

[clang] [llvm] [PAC] Fix address discrimination for type info vtable pointers (PR #102199)

2024-09-16 Thread Daniil Kovalev via cfe-commits
@@ -3955,9 +3955,23 @@ void ItaniumRTTIBuilder::BuildVTablePointer(const Type *Ty) { VTable, Two); } - if (auto &Schema = CGM.getCodeGenOpts().PointerAuth.CXXTypeInfoVTablePointer) -VTable = CGM.getConstantSigne

[clang] [llvm] [PAC] Fix address discrimination for type info vtable pointers (PR #102199)

2024-09-29 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 updated https://github.com/llvm/llvm-project/pull/102199 >From 0c20bcdf35f3c15024986da50cafb2a8c155e3cf Mon Sep 17 00:00:00 2001 From: Daniil Kovalev Date: Tue, 6 Aug 2024 20:48:02 +0300 Subject: [PATCH 1/3] [PAC] Fix address discrimination for type info vtable poin

[clang] [llvm] [PAC] Fix address discrimination for type info vtable pointers (PR #102199)

2024-09-29 Thread Daniil Kovalev via cfe-commits
kovdan01 wrote: @efriedma-quic I've switched to `replaceInitializer`, thanks for suggestion! Now we construct `GV` with `nullptr` as initializer and `llvm::ConstantStruct::getTypeForElements(Fields)` as type, and then replace the initializer with `llvm::ConstantStruct::getAnon(Fields)`. See 5

[clang] [llvm] [PAC][ELF][AArch64] Support signed personality function pointer (PR #113148)

2024-10-21 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 created https://github.com/llvm/llvm-project/pull/113148 If function pointer signing is enabled, sign personality function pointer stored in `.DW.ref.__gxx_personality_v0` section with IA key, 0x7EAD = `ptrauth_string_discriminator("personality")` constant discrimin

[clang] [llvm] [PAC][ELF][AArch64] Support signed personality function pointer (PR #113148)

2024-10-21 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 ready_for_review https://github.com/llvm/llvm-project/pull/113148 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PAC][clang] Add `-faarch64-jump-table-hardening` driver flag (PR #113149)

2024-10-21 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 created https://github.com/llvm/llvm-project/pull/113149 None >From 63c44aeddc461d193a64677d0d066d9cb0851b2a Mon Sep 17 00:00:00 2001 From: Daniil Kovalev Date: Mon, 21 Oct 2024 11:32:02 +0300 Subject: [PATCH] [PAC][clang] Add `-faarch64-jump-table-hardening` driver

[clang] [PAC][clang] Add `-faarch64-jump-table-hardening` driver flag (PR #113149)

2024-10-21 Thread Daniil Kovalev via cfe-commits
kovdan01 wrote: * **#113150** https://app.graphite.dev/github/pr/llvm/llvm-project/113150?utm_source=stack-comment-icon"; target="_blank">https://static.graphite.dev/graphite-32x32-black.png"; alt="Graphite" width="10px" height="10px"/> * **#113149** https://app.graphite.dev/github/pr/llvm/llvm

[clang] [PAC][Driver] Add `-faarch64-jump-table-hardening` flag (PR #113149)

2024-10-21 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 edited https://github.com/llvm/llvm-project/pull/113149 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PAC][Driver] Add `-faarch64-jump-table-hardening` flag (PR #113149)

2024-10-21 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 ready_for_review https://github.com/llvm/llvm-project/pull/113149 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PAC] Fix address discrimination for type info vtable pointers (PR #102199)

2024-10-17 Thread Daniil Kovalev via cfe-commits
@@ -4207,16 +4214,31 @@ llvm::Constant *ItaniumRTTIBuilder::BuildTypeInfo( break; } - llvm::Constant *Init = llvm::ConstantStruct::getAnon(Fields); - SmallString<256> Name; llvm::raw_svector_ostream Out(Name); CGM.getCXXABI().getMangleContext().mangleCXXRTTI(Ty

[clang] [llvm] [PAC] Fix address discrimination for type info vtable pointers (PR #102199)

2024-10-17 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 closed https://github.com/llvm/llvm-project/pull/102199 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PAC][ELF][AArch64] Support signed personality function pointer (PR #113148)

2024-10-28 Thread Daniil Kovalev via cfe-commits
kovdan01 wrote: Would be glad to see everyone's feedback on the changes. https://github.com/llvm/llvm-project/pull/113148 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PAC][Driver] Add `-faarch64-jump-table-hardening` flag (PR #113149)

2024-10-28 Thread Daniil Kovalev via cfe-commits
kovdan01 wrote: @ahmedbougacha @ahatanak Please let me know if you have any objections on this. https://github.com/llvm/llvm-project/pull/113149 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

[clang] [PAC][clang][Driver] Add signed GOT flag (PR #96160)

2024-11-11 Thread Daniil Kovalev via cfe-commits
kovdan01 wrote: > Using cc1 options looks fine. Thanks! > Sorry, I made a mistake by approving #85235, which added a lot of driver > options. It's not clear who are the initial ELF ptrauth users, but I am not > sure with a very small user base, there are a lot of demands to customize the > p

[clang] [PAC][clang][Driver] Add signed GOT flag (PR #96160)

2024-11-12 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 updated https://github.com/llvm/llvm-project/pull/96160 >From 1ca6cf823585b03a6c580b23caafd1ff44d83aa7 Mon Sep 17 00:00:00 2001 From: Daniil Kovalev Date: Tue, 6 Aug 2024 20:02:07 +0300 Subject: [PATCH 1/3] [PAC][clang][Driver] Add signed GOT flag Depends on #96159

[clang] [PAC][clang] Add signed GOT cc1 flag (PR #96160)

2024-11-12 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 edited https://github.com/llvm/llvm-project/pull/96160 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PAC][clang] Add signed GOT cc1 flag (PR #96160)

2024-11-12 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 edited https://github.com/llvm/llvm-project/pull/96160 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PAC][clang] Add signed GOT cc1 flag (PR #96160)

2024-11-12 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 updated https://github.com/llvm/llvm-project/pull/96160 >From 1ca6cf823585b03a6c580b23caafd1ff44d83aa7 Mon Sep 17 00:00:00 2001 From: Daniil Kovalev Date: Tue, 6 Aug 2024 20:02:07 +0300 Subject: [PATCH 1/3] [PAC][clang][Driver] Add signed GOT flag Depends on #96159

[clang] [PAC][clang][Driver] Add signed GOT flag (PR #96160)

2024-11-10 Thread Daniil Kovalev via cfe-commits
kovdan01 wrote: @MaskRay Would be glad to see your answer on the question above: > If we only add cc1 flag and postpone adding driver flag, would it be OK? https://github.com/llvm/llvm-project/pull/96160 ___ cfe-commits mailing list cfe-commits@lists.

[clang] [PAC][clang] Use cc1 instead of driver in init-fini codegen test (PR #109247)

2024-09-19 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 closed https://github.com/llvm/llvm-project/pull/109247 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PAC] Fix address discrimination for type info vtable pointers (PR #102199)

2024-09-20 Thread Daniil Kovalev via cfe-commits
kovdan01 wrote: > I think you should be able to avoid constructing the initializer twice if you > restructure the code a bit to just construct the global before the call to > BuildVTablePointer. I added GlobalVariable::replaceInitializer because I was > looking at this review: it lets you cons

[clang] [PAC][clang] Use cc1 instead of driver in init-fini codegen test (PR #109247)

2024-09-19 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 ready_for_review https://github.com/llvm/llvm-project/pull/109247 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PAC][clang] Use cc1 instead of driver in init-fini codegen test (PR #109247)

2024-09-18 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 created https://github.com/llvm/llvm-project/pull/109247 None >From 26e9605ba09e0bc997a17804bae482d556501c0a Mon Sep 17 00:00:00 2001 From: Daniil Kovalev Date: Tue, 10 Sep 2024 10:02:07 +0300 Subject: [PATCH] [PAC][clang] Use cc1 instead of driver in init-fini code

[clang] [PAC][clang][Driver] Add signed GOT flag (PR #96160)

2024-10-25 Thread Daniil Kovalev via cfe-commits
kovdan01 wrote: > Given the complexity of the feature and lack of upstream runtime linker > (rtld) support, it might be wise to delay exposing it through driver options > until it's more mature. What do you think? @MaskRay I suppose that if exposing this to driver options is considered undesi

[clang] [PAC][clang][Driver] Add signed GOT flag (PR #96160)

2024-10-25 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 updated https://github.com/llvm/llvm-project/pull/96160 >From 1ca6cf823585b03a6c580b23caafd1ff44d83aa7 Mon Sep 17 00:00:00 2001 From: Daniil Kovalev Date: Tue, 6 Aug 2024 20:02:07 +0300 Subject: [PATCH 1/2] [PAC][clang][Driver] Add signed GOT flag Depends on #96159

[clang] [PAC][Driver] Add `-faarch64-jump-table-hardening` flag (PR #113149)

2024-11-24 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 updated https://github.com/llvm/llvm-project/pull/113149 >From 06b865d888142acf2c7a66ea487a14f34169 Mon Sep 17 00:00:00 2001 From: Daniil Kovalev Date: Mon, 21 Oct 2024 11:32:02 +0300 Subject: [PATCH] [PAC][clang] Add `-faarch64-jump-table-hardening` driver flag

[clang] [PAC][clang] Add signed GOT cc1 flag (PR #96160)

2024-11-18 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 closed https://github.com/llvm/llvm-project/pull/96160 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PAC][clang] Add signed GOT cc1 flag (PR #96160)

2024-11-18 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 edited https://github.com/llvm/llvm-project/pull/96160 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PAC][ELF][AArch64] Support signed personality function pointer (PR #113148)

2024-11-18 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 updated https://github.com/llvm/llvm-project/pull/113148 >From e192b193471831d004a715ce3b1684198342dba4 Mon Sep 17 00:00:00 2001 From: Daniil Kovalev Date: Mon, 21 Oct 2024 13:28:58 +0300 Subject: [PATCH] [PAC][ELF][AArch64] Support signed personality function point

[clang] [PAC][clang] Add signed GOT cc1 flag (PR #96160)

2024-11-18 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 edited https://github.com/llvm/llvm-project/pull/96160 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PAC][ELF][AArch64] Support signed personality function pointer (PR #113148)

2024-11-18 Thread Daniil Kovalev via cfe-commits
kovdan01 wrote: Would be glad to see everyone's feedback on the changes. https://github.com/llvm/llvm-project/pull/113148 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PAC][clang] Add signed GOT cc1 flag (PR #96160)

2024-11-18 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 updated https://github.com/llvm/llvm-project/pull/96160 >From fd3919e8fcd6c40fc8dcb83b4d1d8dd2fee0e5bb Mon Sep 17 00:00:00 2001 From: Daniil Kovalev Date: Fri, 15 Nov 2024 10:46:27 +0300 Subject: [PATCH] [PAC][clang] Add signed GOT cc1 flag Add `-fptrauth-elf-got` c

[clang] [PAC][Driver] Add `-faarch64-jump-table-hardening` flag (PR #113149)

2024-11-19 Thread Daniil Kovalev via cfe-commits
kovdan01 wrote: @ahmedbougacha @ahatanak Please let me know if you have any objections on this. @MaskRay Would be glad to see your feedback as well. See also https://github.com/llvm/llvm-project/pull/113152#issuecomment-2486394507 https://github.com/llvm/llvm-project/pull/113149 ___

[clang] [llvm] [PAC][ELF][AArch64] Support signed personality function pointer (PR #113148)

2024-11-19 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 updated https://github.com/llvm/llvm-project/pull/113148 >From 9d7f4eb9a99a7d765095f571f5a209164862fe49 Mon Sep 17 00:00:00 2001 From: Daniil Kovalev Date: Mon, 21 Oct 2024 13:28:58 +0300 Subject: [PATCH] [PAC][ELF][AArch64] Support signed personality function point

[clang] [PAC][Driver] Add `-faarch64-jump-table-hardening` flag (PR #113149)

2024-11-19 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 updated https://github.com/llvm/llvm-project/pull/113149 >From 270fa9e3e47a9e23031bfdd421695727fbee14c2 Mon Sep 17 00:00:00 2001 From: Daniil Kovalev Date: Mon, 21 Oct 2024 11:32:02 +0300 Subject: [PATCH] [PAC][clang] Add `-faarch64-jump-table-hardening` driver flag

[clang] [PAC][Driver] Add `-faarch64-jump-table-hardening` flag (PR #113149)

2024-11-09 Thread Daniil Kovalev via cfe-commits
kovdan01 wrote: @ahmedbougacha @ahatanak Please let me know if you have any objections on this. https://github.com/llvm/llvm-project/pull/113149 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

[clang] [llvm] [PAC][ELF][AArch64] Support signed personality function pointer (PR #113148)

2024-11-09 Thread Daniil Kovalev via cfe-commits
kovdan01 wrote: Would be glad to see everyone's feedback on the changes. https://github.com/llvm/llvm-project/pull/113148 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PAC][clang] Add signed GOT cc1 flag (PR #96160)

2024-11-14 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 updated https://github.com/llvm/llvm-project/pull/96160 >From 3a5ae0151d6fc0d5753450a4277852e5e090cabe Mon Sep 17 00:00:00 2001 From: Daniil Kovalev Date: Fri, 15 Nov 2024 10:46:27 +0300 Subject: [PATCH] [PAC][clang] Add signed GOT cc1 flag Add `-fptrauth-elf-got` c

[clang] [PAC][clang] Add signed GOT cc1 flag (PR #96160)

2024-11-14 Thread Daniil Kovalev via cfe-commits
kovdan01 wrote: Rebased on top of current main with fixing conflicts. @MaskRay Would be glad if you give your feedback on this so the PR could be finally merged if no issues are left. https://github.com/llvm/llvm-project/pull/96160 ___ cfe-commits mai

[clang] [llvm] [PAC][ELF][AArch64] Support signed personality function pointer (PR #113148)

2024-11-26 Thread Daniil Kovalev via cfe-commits
kovdan01 wrote: Would be glad to see everyone's feedback on the changes. https://github.com/llvm/llvm-project/pull/113148 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PAC][Driver] Add `-faarch64-jump-table-hardening` flag (PR #113149)

2024-11-26 Thread Daniil Kovalev via cfe-commits
kovdan01 wrote: @ahmedbougacha @ahatanak Please let me know if you have any objections on this. https://github.com/llvm/llvm-project/pull/113149 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

[clang] [PAC][Driver] Add `-faarch64-jump-table-hardening` flag (PR #113149)

2024-11-24 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 updated https://github.com/llvm/llvm-project/pull/113149 >From c4c6657bd4a191c79784b4f280b8b03ce3e06bdd Mon Sep 17 00:00:00 2001 From: Daniil Kovalev Date: Mon, 21 Oct 2024 11:32:02 +0300 Subject: [PATCH] [PAC][clang] Add `-faarch64-jump-table-hardening` driver flag

[clang] [PAC][clang] Add new features to pauthtest ABI (PR #113150)

2024-12-05 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 updated https://github.com/llvm/llvm-project/pull/113150 >From f670756ad5e120a3c81025565ab96c3aea12cd3e Mon Sep 17 00:00:00 2001 From: Daniil Kovalev Date: Mon, 21 Oct 2024 10:58:04 +0300 Subject: [PATCH] [PAC][clang] Add new features to pauthtest ABI Enable init/fi

[clang] [PAC][Driver] Add `-faarch64-jump-table-hardening` flag (PR #113149)

2024-12-05 Thread Daniil Kovalev via cfe-commits
kovdan01 wrote: ### Merge activity * **Dec 5, 3:32 AM EST**: A user started a stack merge that includes this pull request via [Graphite](https://app.graphite.dev/github/pr/llvm/llvm-project/113149). https://github.com/llvm/llvm-project/pull/113149

[clang] [PAC][clang] Add new features to pauthtest ABI (PR #113150)

2024-12-05 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 edited https://github.com/llvm/llvm-project/pull/113150 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PAC][Driver] Add `-faarch64-jump-table-hardening` flag (PR #113149)

2024-12-05 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 closed https://github.com/llvm/llvm-project/pull/113149 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PAC][ELF][AArch64] Support signed personality function pointer (PR #113148)

2024-12-04 Thread Daniil Kovalev via cfe-commits
@@ -35,6 +35,16 @@ AArch64TargetStreamer::AArch64TargetStreamer(MCStreamer &S) AArch64TargetStreamer::~AArch64TargetStreamer() = default; +void AArch64TargetStreamer::emitAuthValue(const MCExpr *Expr, + uint16_t Discriminator, +

[clang] [PAC][Driver] Add `-faarch64-jump-table-hardening` flag (PR #113149)

2024-12-04 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 edited https://github.com/llvm/llvm-project/pull/113149 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PAC][Driver] Add `-faarch64-jump-table-hardening` flag (PR #113149)

2024-12-04 Thread Daniil Kovalev via cfe-commits
kovdan01 wrote: > LGTM > > I expect some discussion in the description / commit message why > AArch64JumpTableHardening is placed together with other `PointerAuth*` > options. @MaskRay Thanks for feedback, please let me know if the following description addresses your comment: > The flag is

[clang] [llvm] [PAC][ELF][AArch64] Support signed personality function pointer (PR #113148)

2024-12-04 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 updated https://github.com/llvm/llvm-project/pull/113148 >From 9d7f4eb9a99a7d765095f571f5a209164862fe49 Mon Sep 17 00:00:00 2001 From: Daniil Kovalev Date: Mon, 21 Oct 2024 13:28:58 +0300 Subject: [PATCH 1/4] [PAC][ELF][AArch64] Support signed personality function p

[clang] [llvm] [PAC][ELF][AArch64] Support signed personality function pointer (PR #113148)

2024-12-04 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 updated https://github.com/llvm/llvm-project/pull/113148 >From 9d7f4eb9a99a7d765095f571f5a209164862fe49 Mon Sep 17 00:00:00 2001 From: Daniil Kovalev Date: Mon, 21 Oct 2024 13:28:58 +0300 Subject: [PATCH 1/3] [PAC][ELF][AArch64] Support signed personality function p

[clang] [llvm] [PAC][ELF][AArch64] Support signed personality function pointer (PR #113148)

2024-12-04 Thread Daniil Kovalev via cfe-commits
@@ -28,6 +29,21 @@ void AArch64_ELFTargetObjectFile::Initialize(MCContext &Ctx, SupportDebugThreadLocalLocation = false; } +void AArch64_ELFTargetObjectFile::emitPersonalityValueImpl( +MCStreamer &Streamer, const DataLayout &DL, const MCSymbol *Sym, +const MachineMod

[clang] [llvm] [PAC][ELF][AArch64] Support signed personality function pointer (PR #113148)

2024-12-08 Thread Daniil Kovalev via cfe-commits
kovdan01 wrote: @MaskRay Please let me know if latest changes fix your previous comments and if this could be merged. https://github.com/llvm/llvm-project/pull/113148 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-b

[clang] [PAC][clang] Add new features to pauthtest ABI (PR #113150)

2024-12-07 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 updated https://github.com/llvm/llvm-project/pull/113150 >From 74814fd9424853399196b7d1e73f6171b0f1980b Mon Sep 17 00:00:00 2001 From: Daniil Kovalev Date: Mon, 21 Oct 2024 10:58:04 +0300 Subject: [PATCH] [PAC][clang] Add new features to pauthtest ABI Enable init/fi

[clang] [PAC] Do not support some values of branch-protection with ptrauth-returns (PR #125280)

2025-01-31 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 created https://github.com/llvm/llvm-project/pull/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

[clang] [PAC] Do not support some values of branch-protection with ptrauth-returns (PR #125280)

2025-01-31 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 ready_for_review https://github.com/llvm/llvm-project/pull/125280 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PAC][ELF][AArch64] Support signed personality function pointer (PR #113148)

2024-12-09 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 closed https://github.com/llvm/llvm-project/pull/113148 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Revert "[PAC][ELF][AArch64] Support signed personality function pointer" (PR #119331)

2024-12-09 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 created https://github.com/llvm/llvm-project/pull/119331 Reverts llvm/llvm-project#113148 See buildbot failure https://lab.llvm.org/buildbot/#/builders/190/builds/11048 >From 4fe98aa2253925a6bc24bd30f2c654756c77cc28 Mon Sep 17 00:00:00 2001 From: Daniil Kovalev Dat

<    1   2   3   4   5   >