Skip to content

Commit 8cfb4ea

Browse files
committed
[ABI/Runtime] Add pointer auth primitiives for accessible functions
1 parent 9157cb0 commit 8cfb4ea

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

include/swift/ABI/MetadataValues.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1424,6 +1424,9 @@ namespace SpecialPointerAuthDiscriminators {
14241424

14251425
/// Dispatch integration.
14261426
const uint16_t DispatchInvokeFunction = 0xf493; // = 62611
1427+
1428+
/// Functions accessible at runtime (i.e. distributed method accessors).
1429+
const uint16_t AccessibleFunctionRecord = 0x438c; // = 17292
14271430
}
14281431

14291432
/// The number of arguments that will be passed directly to a generic

include/swift/Runtime/Config.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,9 @@ extern uintptr_t __COMPATIBILITY_LIBRARIES_CANNOT_CHECK_THE_IS_SWIFT_BIT_DIRECTL
302302
#define __ptrauth_swift_dispatch_invoke_function \
303303
__ptrauth(ptrauth_key_process_independent_code, 1, \
304304
SpecialPointerAuthDiscriminators::DispatchInvokeFunction)
305+
#define __ptrauth_swift_accessible_function_record \
306+
__ptrauth(ptrauth_key_process_independent_data, 1, \
307+
SpecialPointerAuthDiscriminators::AccessibleFunctionRecord)
305308
#define __ptrauth_swift_objc_superclass \
306309
__ptrauth(ptrauth_key_process_independent_data, 1, \
307310
swift::SpecialPointerAuthDiscriminators::ObjCSuperclass)
@@ -334,6 +337,7 @@ extern uintptr_t __COMPATIBILITY_LIBRARIES_CANNOT_CHECK_THE_IS_SWIFT_BIT_DIRECTL
334337
#define __ptrauth_swift_cancellation_notification_function
335338
#define __ptrauth_swift_escalation_notification_function
336339
#define __ptrauth_swift_dispatch_invoke_function
340+
#define __ptrauth_swift_accessible_function_record
337341
#define __ptrauth_swift_objc_superclass
338342
#define __ptrauth_swift_runtime_function_entry
339343
#define __ptrauth_swift_runtime_function_entry_with_key(__key)

0 commit comments

Comments
 (0)