[all-commits] [llvm/llvm-project] 7c814c: [clang] Define ptrauth_sign_constant builtin. (#93...
Ahmed Bougacha via All-commits
all-commits at lists.llvm.org
Thu Jun 20 12:10:16 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 7c814c13d0df6dbd0ef6a8b2be214d3f6edbb566
https://github.com/llvm/llvm-project/commit/7c814c13d0df6dbd0ef6a8b2be214d3f6edbb566
Author: Ahmed Bougacha <ahmed at bougacha.org>
Date: 2024-06-20 (Thu, 20 Jun 2024)
Changed paths:
M clang/docs/PointerAuthentication.rst
M clang/include/clang/Basic/Builtins.td
M clang/include/clang/Basic/DiagnosticSemaKinds.td
M clang/lib/AST/ExprConstant.cpp
M clang/lib/CodeGen/CGBuiltin.cpp
M clang/lib/CodeGen/CGExprConstant.cpp
A clang/lib/CodeGen/CGPointerAuth.cpp
M clang/lib/CodeGen/CMakeLists.txt
M clang/lib/CodeGen/CodeGenModule.h
M clang/lib/Headers/ptrauth.h
M clang/lib/Sema/SemaChecking.cpp
A clang/test/CodeGen/ptrauth-intrinsic-sign-constant.c
M clang/test/Sema/ptrauth-intrinsics-macro.c
M clang/test/Sema/ptrauth.c
Log Message:
-----------
[clang] Define ptrauth_sign_constant builtin. (#93904)
This is a constant-expression equivalent to
ptrauth_sign_unauthenticated. Its constant nature lets us guarantee
a non-attackable sequence is generated, unlike
ptrauth_sign_unauthenticated which we generally discourage using.
It being a constant also allows its usage in global initializers, though
requiring constant pointers and discriminators.
The value must be a constant expression of pointer type which evaluates
to a non-null pointer.
The key must be a constant expression of type ptrauth_key.
The extra data must be a constant expression of pointer or integer type;
if an integer, it will be coerced to ptrauth_extra_data_t.
The result will have the same type as the original value.
This can be used in constant expressions.
Co-authored-by: John McCall <rjmccall at apple.com>
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list