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

2024-12-17 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 updated https://github.com/llvm/llvm-project/pull/113150 >From 838b0d0ed5592b2a74560373252f17b49ae64ee7 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][clang] Add new features to pauthtest ABI (PR #113150)

2024-12-16 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 updated https://github.com/llvm/llvm-project/pull/113150 >From 8384b1df4f7bbf454580b7486988e1808df9825d 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] [llvm] [PAC][ELF][AArch64] Support signed personality function pointer (PR #119361)

2024-12-15 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 closed https://github.com/llvm/llvm-project/pull/119361 ___ 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 #119361)

2024-12-15 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 updated https://github.com/llvm/llvm-project/pull/119361 >From 944b2f8fb6357c5ef9efbdaf0c2c3dcd8cb9f890 Mon Sep 17 00:00:00 2001 From: Daniil Kovalev Date: Tue, 10 Dec 2024 08:48:09 +0300 Subject: [PATCH 1/2] [PAC][ELF][AArch64] Support signed personality function p

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

2024-12-10 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 ready_for_review https://github.com/llvm/llvm-project/pull/119361 ___ 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 #119361)

2024-12-10 Thread Daniil Kovalev via cfe-commits
kovdan01 wrote: @MaskRay Regarding your comment https://github.com/llvm/llvm-project/pull/113148#discussion_r1866992275: > We should add a subclass of MachineModuleInfoELF similar to > `AMDGPUMachineModuleInfo`, then move `HasSignedpersonality` there. Here you > can use a static_cast. Maybe

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

2024-12-10 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 created https://github.com/llvm/llvm-project/pull/119361 Re-apply #113148 after revert in #119331 If function pointer signing is enabled, sign personality function pointer stored in `.DW.ref.__gxx_personality_v0` section with IA key, 0x7EAD = `ptrauth_string_discri

[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 ready_for_review https://github.com/llvm/llvm-project/pull/119331 ___ 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 closed https://github.com/llvm/llvm-project/pull/119331 ___ 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

[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] [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][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] [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][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
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] [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-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
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] [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] [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] [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-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] [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-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][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][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][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] [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][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] [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-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] [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-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][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][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-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][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][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] [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][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][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][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] [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][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][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] [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] [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] 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] 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-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] 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-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 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] [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] [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-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
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
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] [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] [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] [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-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] 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] Fix address discrimination for type info vtable pointers (PR #102199)

2024-08-06 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 ready_for_review 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] Fix address discrimination for type info vtable pointers (PR #102199)

2024-08-06 Thread Daniil Kovalev via cfe-commits
kovdan01 wrote: Also tagging @ojhunt (GitHub still does not let to add as a reviewer) 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] Fix address discrimination for type info vtable pointers (PR #102199)

2024-08-06 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 created https://github.com/llvm/llvm-project/pull/102199 In #99726, `-fptrauth-type-info-vtable-pointer-discrimination` was introduced, which is intended to enable type and address discrimination for type_info vtable pointers. However, some codegen logic for actuall

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

2024-08-06 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][clang][Driver] Add signed GOT flag (PR #96160)

2024-08-06 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] [PAC][clang][Driver] Add signed GOT flag Depends on #96159 Add

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

2024-08-06 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 closed 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] [llvm] [PAC][ELF][AArch64] Encode signed GOT flag in PAuth core info (PR #96159)

2024-08-06 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 edited 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] [compiler-rt] [llvm] [PAC][AArch64] Support init/fini array signing (PR #96478)

2024-08-06 Thread Daniil Kovalev via cfe-commits
kovdan01 wrote: @piotrAMD Submitted #102154 with a fix. Could you please check if it resolves the issue for you? https://github.com/llvm/llvm-project/pull/96478 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mai

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

2024-08-06 Thread Daniil Kovalev via cfe-commits
kovdan01 wrote: @piotrAMD It looks like that `__has_feature` preprocessor directive support was implemented in gcc only in 2023: https://github.com/gcc-mirror/gcc/commit/06280a906cb3dc80cf5e07cf3335b758848d488d Thanks for reporting. I suppose we can just surround this chunk of code with `#ifd

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

2024-08-06 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/4] [PAC][ELF][AArch64] Encode signed GOT flag in PAuth core i

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

2024-08-06 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/3] [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-08-05 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 closed 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-08-05 Thread Daniil Kovalev via cfe-commits
kovdan01 wrote: Ping: this PR blocks merging already approved #96159 (see https://github.com/llvm/llvm-project/pull/96159#issuecomment-2211411440), which transitively also blocks merging already approved dependent #96164. Would be glad to see feedback on the changes from those who are interest

[clang] [PAC] Add support for __ptrauth type qualifier (PR #100830)

2024-08-04 Thread Daniil Kovalev via cfe-commits
@@ -8210,6 +8228,70 @@ static void HandleNeonVectorTypeAttr(QualType &CurType, const ParsedAttr &Attr, CurType = S.Context.getVectorType(CurType, numElts, VecKind); } +/// Handle the __ptrauth qualifier. +static void HandlePtrAuthQualifier(ASTContext &Ctx, QualType &T, +

[clang] [PAC] Add support for __ptrauth type qualifier (PR #100830)

2024-08-04 Thread Daniil Kovalev via cfe-commits
@@ -2196,6 +2196,58 @@ Value *ScalarExprEmitter::VisitInitListExpr(InitListExpr *E) { return V; } +static bool isDeclRefKnownNonNull(CodeGenFunction &CGF, const ValueDecl *D) { + return !D->isWeak(); +} + +static bool isLValueKnownNonNull(CodeGenFunction &CGF, const Expr *

[clang] [PAC] Add support for __ptrauth type qualifier (PR #100830)

2024-08-04 Thread Daniil Kovalev via cfe-commits
@@ -2196,6 +2196,58 @@ Value *ScalarExprEmitter::VisitInitListExpr(InitListExpr *E) { return V; } +static bool isDeclRefKnownNonNull(CodeGenFunction &CGF, const ValueDecl *D) { + return !D->isWeak(); +} + +static bool isLValueKnownNonNull(CodeGenFunction &CGF, const Expr *

[clang] [PAC] Add support for __ptrauth type qualifier (PR #100830)

2024-08-04 Thread Daniil Kovalev via cfe-commits
@@ -0,0 +1,84 @@ +// RUN: %clang_cc1 -triple arm64-apple-ios -fsyntax-only -verify -fptrauth-intrinsics %s + +#include kovdan01 wrote: It looks like this include is not needed https://github.com/llvm/llvm-project/pull/100830 ___

[clang] [PAC] Add support for __ptrauth type qualifier (PR #100830)

2024-08-04 Thread Daniil Kovalev via cfe-commits
@@ -0,0 +1,84 @@ +// RUN: %clang_cc1 -triple arm64-apple-ios -fsyntax-only -verify -fptrauth-intrinsics %s + +#include + +#if __has_feature(ptrauth_qualifier) +#warning __ptrauth qualifier enabled! +// expected-warning@-1 {{__ptrauth qualifier enabled!}} +#endif + +#if __aarch64

[clang] [PAC] Add support for __ptrauth type qualifier (PR #100830)

2024-08-04 Thread Daniil Kovalev via cfe-commits
@@ -2196,6 +2196,58 @@ Value *ScalarExprEmitter::VisitInitListExpr(InitListExpr *E) { return V; } +static bool isDeclRefKnownNonNull(CodeGenFunction &CGF, const ValueDecl *D) { + return !D->isWeak(); +} + +static bool isLValueKnownNonNull(CodeGenFunction &CGF, const Expr *

[clang] [PAC] Add support for __ptrauth type qualifier (PR #100830)

2024-08-04 Thread Daniil Kovalev via cfe-commits
@@ -2196,6 +2196,58 @@ Value *ScalarExprEmitter::VisitInitListExpr(InitListExpr *E) { return V; } +static bool isDeclRefKnownNonNull(CodeGenFunction &CGF, const ValueDecl *D) { + return !D->isWeak(); +} + +static bool isLValueKnownNonNull(CodeGenFunction &CGF, const Expr *

[clang] [PAC] Add support for __ptrauth type qualifier (PR #100830)

2024-08-04 Thread Daniil Kovalev via cfe-commits
@@ -0,0 +1,84 @@ +// RUN: %clang_cc1 -triple arm64-apple-ios -fsyntax-only -verify -fptrauth-intrinsics %s + +#include + +#if __has_feature(ptrauth_qualifier) +#warning __ptrauth qualifier enabled! +// expected-warning@-1 {{__ptrauth qualifier enabled!}} +#endif + +#if __aarch64

[clang] [PAC] Add support for __ptrauth type qualifier (PR #100830)

2024-08-04 Thread Daniil Kovalev via cfe-commits
@@ -1758,6 +1758,34 @@ Also see the documentation for `@available }]; } +def PtrAuthDocs : Documentation { + let Category = DocCatVariable; + let Heading = "__ptrauth, __ptrauth_restricted_intptr"; + let Content = [{ +The ``__ptrauth`` qualifier allows the programmer to d

[clang] [PAC] Add support for __ptrauth type qualifier (PR #100830)

2024-08-04 Thread Daniil Kovalev via cfe-commits
@@ -,6 +5579,27 @@ CGCallee CodeGenFunction::EmitCallee(const Expr *E) { return EmitCallee(ICE->getSubExpr()); } +// Try to remember the original __ptrauth qualifier for loads of +// function pointers. +if (ICE->getCastKind() == CK_LValueToRValue) { +

[clang] [PAC] Add support for __ptrauth type qualifier (PR #100830)

2024-08-04 Thread Daniil Kovalev via cfe-commits
@@ -0,0 +1,87 @@ +// RUN: %clang_cc1 -triple arm64-apple-ios -fptrauth-calls -fptrauth-intrinsics -emit-llvm %s -o - | FileCheck %s + +#include + +// Constant initializers for data pointers. +extern int external_int; + +// CHECK: @g1 = global ptr ptrauth (ptr @external_int, i32

[clang] [PAC] Add support for __ptrauth type qualifier (PR #100830)

2024-08-04 Thread Daniil Kovalev via cfe-commits
@@ -0,0 +1,132 @@ +// RUN: %clang_cc1 %s -fptrauth-function-pointer-type-discrimination -triple arm64e-apple-ios13 -fptrauth-calls -fptrauth-intrinsics -disable-llvm-passes -emit-llvm -o- | FileCheck %s kovdan01 wrote: Nit: it's probably worth to also hav

[clang] [PAC] Add support for __ptrauth type qualifier (PR #100830)

2024-08-04 Thread Daniil Kovalev via cfe-commits
@@ -0,0 +1,32 @@ +// RUN: %clang_cc1 -triple arm64-apple-ios \ +// RUN: -fptrauth-calls -fptrauth-intrinsics -emit-llvm -fblocks \ +// RUN: %s -debug-info-kind=limited -o - | FileCheck %s + +// Constant initializers for data pointers. +extern int external_int; + +int *__ptraut

[clang] [PAC] Add support for __ptrauth type qualifier (PR #100830)

2024-08-04 Thread Daniil Kovalev via cfe-commits
@@ -0,0 +1,132 @@ +// RUN: %clang_cc1 %s -fptrauth-function-pointer-type-discrimination -triple arm64e-apple-ios13 -fptrauth-calls -fptrauth-intrinsics -disable-llvm-passes -emit-llvm -o- | FileCheck %s kovdan01 wrote: Nit: it looks like you can use arm64

  1   2   3   4   5   >