Skip to content

Commit f5a87e5

Browse files
committed
Document ptrauth_sign_constant in clang/docs/PointerAuthentication.
1 parent 20bbad2 commit f5a87e5

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

clang/docs/PointerAuthentication.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,23 @@ Given that ``signedPointer`` matches the layout for signed pointers signed with
356356
the given key, extract the raw pointer from it. This operation does not trap
357357
and cannot fail, even if the pointer is not validly signed.
358358

359+
``ptrauth_sign_constant``
360+
^^^^^^^^^^^^^^^^^^^^^^^^^
361+
362+
.. code-block:: c
363+
364+
ptrauth_sign_constant(pointer, key, discriminator)
365+
366+
Return a signed pointer for a constant address in a manner which guarantees
367+
a non-attackable sequence.
368+
369+
``pointer`` must be a constant expression of pointer type which evaluates to
370+
a non-null pointer. The result will have the same type as ``discriminator``.
371+
372+
Calls to this are constant expressions if the discriminator is a null-pointer
373+
constant expression or an integer constant expression. Implementations may
374+
allow other pointer expressions as well.
375+
359376
``ptrauth_sign_unauthenticated``
360377
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
361378

0 commit comments

Comments
 (0)