https://github.com/ahatanak closed
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
https://github.com/ahatanak closed
https://github.com/llvm/llvm-project/pull/95203
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -0,0 +1,10 @@
+// RUN: %clang_cc1 -triple arm64-apple-ios -fptrauth-calls
-fptrauth-intrinsics -emit-llvm %s -o - | FileCheck %s
ahatanak wrote:
We can probably consolidate some of the tests. I'll look into it later.
https://github.com/llvm/llvm-project/pul
@@ -0,0 +1,31 @@
+// RUN: %clang_cc1 %s -triple arm64e-apple-ios13 -fptrauth-calls
-fptrauth-intrinsics -disable-llvm-passes -emit-llvm -o- | FileCheck %s
+// RUN: %clang_cc1 -xc++ %s -triple arm64e-apple-ios13 -fptrauth-calls
-fptrauth-intrinsics -disable-llvm-passes -emi
@@ -0,0 +1,5 @@
+// RUN: %clang_cc1 -triple arm64e-apple-ios -fptrauth-calls %s -verify
-emit-llvm -o -
+
+void f(void);
+
+int *pf = (int *)&f + 1; // expected-error{{cannot compile this static
initializer yet}}
ahatanak wrote:
As commented in the test case, a
@@ -0,0 +1,13 @@
+// RUN: %clang_cc1 -triple arm64-apple-ios-emit-llvm %s
-o - | FileCheck %s --check-prefixes=ALL,OFF
ahatanak wrote:
I've added RUN lines for `aarch64-linux-gnu`.
https://github.com/llvm/llvm-project/pull/93906
___
@@ -0,0 +1,9 @@
+// RUN: %clang -target arm64-apple-macosx -fptrauth-calls -c %s -### 2>&1 |
FileCheck %s --check-prefix PTRAUTH_CALLS
ahatanak wrote:
I removed the file.
https://github.com/llvm/llvm-project/pull/93906
__
@@ -61,3 +79,28 @@ CodeGen::getConstantSignedPointer(CodeGenModule &CGM,
llvm::Constant *Pointer,
return CGM.getConstantSignedPointer(Pointer, Key, StorageAddress,
OtherDiscriminator);
}
+
+/// If applicable, sign a given constant functi
@@ -61,3 +79,28 @@ CodeGen::getConstantSignedPointer(CodeGenModule &CGM,
llvm::Constant *Pointer,
return CGM.getConstantSignedPointer(Pointer, Key, StorageAddress,
OtherDiscriminator);
}
+
+/// If applicable, sign a given constant functi
@@ -128,12 +136,12 @@ class CGCallee {
static CGCallee forDirect(llvm::Constant *functionPtr,
const CGCalleeInfo &abstractInfo = CGCalleeInfo())
{
-return CGCallee(abstractInfo, functionPtr);
+return CGCallee(abstractInfo, functionPtr, CG
@@ -104,10 +109,13 @@ class CGCallee {
/// Construct a callee. Call this constructor directly when this
/// isn't a direct call.
- CGCallee(const CGCalleeInfo &abstractInfo, llvm::Value *functionPtr)
+ CGCallee(
+ const CGCalleeInfo &abstractInfo, llvm::Value *func
@@ -351,6 +351,9 @@ def err_drv_omp_host_ir_file_not_found : Error<
"target regions but cannot be found">;
def err_drv_omp_host_target_not_supported : Error<
"target '%0' is not a supported OpenMP host target">;
+def err_drv_ptrauth_not_supported : Error<
+ "target '%0' do
https://github.com/ahatanak updated
https://github.com/llvm/llvm-project/pull/93906
>From 0e85001f6d53e63beca77a76eaba1875ec84000d Mon Sep 17 00:00:00 2001
From: Akira Hatanaka
Date: Fri, 24 May 2024 20:23:36 -0700
Subject: [PATCH 1/4] [clang] Implement function pointer signing.
Co-Authored-By
https://github.com/ahatanak updated
https://github.com/llvm/llvm-project/pull/93906
>From 0e85001f6d53e63beca77a76eaba1875ec84000d Mon Sep 17 00:00:00 2001
From: Akira Hatanaka
Date: Fri, 24 May 2024 20:23:36 -0700
Subject: [PATCH 1/4] [clang] Implement function pointer signing.
Co-Authored-By
https://github.com/ahatanak updated
https://github.com/llvm/llvm-project/pull/93906
>From 0e85001f6d53e63beca77a76eaba1875ec84000d Mon Sep 17 00:00:00 2001
From: Akira Hatanaka
Date: Fri, 24 May 2024 20:23:36 -0700
Subject: [PATCH 1/4] [clang] Implement function pointer signing.
Co-Authored-By
@@ -1458,6 +1458,39 @@ static void setPGOUseInstrumentor(CodeGenOptions &Opts,
Opts.setProfileUse(CodeGenOptions::ProfileClangInstr);
}
+bool CompilerInvocation::setDefaultPointerAuthOptions(
+PointerAuthOptions &Opts, const LangOptions &LangOpts,
+const llvm::Trip
@@ -104,10 +109,13 @@ class CGCallee {
/// Construct a callee. Call this constructor directly when this
/// isn't a direct call.
- CGCallee(const CGCalleeInfo &abstractInfo, llvm::Value *functionPtr)
+ CGCallee(
+ const CGCalleeInfo &abstractInfo, llvm::Value *func
@@ -0,0 +1,96 @@
+//===- CGPointerAuthInfo.h - ---*- C++
-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apa
@@ -75,3 +93,36 @@ CodeGen::getConstantSignedPointer(CodeGenModule &CGM,
return CGM.getConstantSignedPointer(pointer, key, storageAddress,
otherDiscriminator);
}
+
+/// If applicable, sign a given constant function pointer with the ABI ru
@@ -346,6 +346,8 @@ class LangOptionsBase {
BKey
};
+ using PointerAuthenticationMode = ::clang::PointerAuthenticationMode;
ahatanak wrote:
I deleted it as it's not needed for this PR.
https://github.com/llvm/llvm-project/pull/93906
__
https://github.com/ahatanak updated
https://github.com/llvm/llvm-project/pull/93906
>From 0e85001f6d53e63beca77a76eaba1875ec84000d Mon Sep 17 00:00:00 2001
From: Akira Hatanaka
Date: Fri, 24 May 2024 20:23:36 -0700
Subject: [PATCH 1/3] [clang] Implement function pointer signing.
Co-Authored-By
@@ -14,10 +14,146 @@
#ifndef LLVM_CLANG_BASIC_POINTERAUTHOPTIONS_H
#define LLVM_CLANG_BASIC_POINTERAUTHOPTIONS_H
+#include "clang/Basic/LLVM.h"
+#include "clang/Basic/LangOptions.h"
+#include "llvm/Support/ErrorHandling.h"
+#include "llvm/Target/TargetOptions.h"
+#include
+#i
https://github.com/ahatanak ready_for_review
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/llvm-branch-commits
https://github.com/ahatanak edited
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/llvm-branch-commits
https://github.com/ahatanak edited
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/llvm-branch-commits
https://github.com/ahatanak updated
https://github.com/llvm/llvm-project/pull/93906
>From 0e85001f6d53e63beca77a76eaba1875ec84000d Mon Sep 17 00:00:00 2001
From: Akira Hatanaka
Date: Fri, 24 May 2024 20:23:36 -0700
Subject: [PATCH 1/2] [clang] Implement function pointer signing.
Co-Authored-By
Author: Akira Hatanaka
Date: 2021-01-25T11:57:08-08:00
New Revision: 53176c168061d6f26dcf3ce4fa59288b7d67255e
URL:
https://github.com/llvm/llvm-project/commit/53176c168061d6f26dcf3ce4fa59288b7d67255e
DIFF:
https://github.com/llvm/llvm-project/commit/53176c168061d6f26dcf3ce4fa59288b7d67255e.diff
Author: Akira Hatanaka
Date: 2021-01-21T17:38:46-08:00
New Revision: 3d349ed7e1108686271a09314dafaa356df4006d
URL:
https://github.com/llvm/llvm-project/commit/3d349ed7e1108686271a09314dafaa356df4006d
DIFF:
https://github.com/llvm/llvm-project/commit/3d349ed7e1108686271a09314dafaa356df4006d.diff
Author: Akira Hatanaka
Date: 2021-01-12T09:58:11-08:00
New Revision: dd955771240289fbcba5fa1312cb8c78f20cd78f
URL:
https://github.com/llvm/llvm-project/commit/dd955771240289fbcba5fa1312cb8c78f20cd78f
DIFF:
https://github.com/llvm/llvm-project/commit/dd955771240289fbcba5fa1312cb8c78f20cd78f.diff
Author: Akira Hatanaka
Date: 2020-12-28T11:52:27-08:00
New Revision: 34405b41d61580ff893057784b1b19f81f66bad3
URL:
https://github.com/llvm/llvm-project/commit/34405b41d61580ff893057784b1b19f81f66bad3
DIFF:
https://github.com/llvm/llvm-project/commit/34405b41d61580ff893057784b1b19f81f66bad3.diff
Author: Akira Hatanaka
Date: 2020-12-18T16:59:06-08:00
New Revision: ffd982f7db58acf6653f987ca6411712feea25c3
URL:
https://github.com/llvm/llvm-project/commit/ffd982f7db58acf6653f987ca6411712feea25c3
DIFF:
https://github.com/llvm/llvm-project/commit/ffd982f7db58acf6653f987ca6411712feea25c3.diff
31 matches
Mail list logo