Skip to content

Conversation

@mikeash
Copy link
Contributor

@mikeash mikeash commented Jul 17, 2023

Cherry-pick #67168 to release/5.9.

Ensure that context descriptor pointers are signed in the runtime by putting the ptrauth_struct attribute on the types.

We use the new __builtin_ptrauth_struct_key/disc to conditionally apply ptrauth_struct to TrailingObjects based on the signing of the base type, so that pointers to TrailingObjects get signed when used with a context descriptor pointer.

We add new runtime entrypoints that take signed pointers where appropriate, and have the compiler emit calls to the new entrypoints when targeting a sufficiently new OS.

rdar://111480914

Ensure that context descriptor pointers are signed in the runtime by putting the ptrauth_struct attribute on the types.

We use the new __builtin_ptrauth_struct_key/disc to conditionally apply ptrauth_struct to TrailingObjects based on the signing of the base type, so that pointers to TrailingObjects get signed when used with a context descriptor pointer.

We add new runtime entrypoints that take signed pointers where appropriate, and have the compiler emit calls to the new entrypoints when targeting a sufficiently new OS.

rdar://111480914
(cherry picked from commit fe7e13b)
@mikeash mikeash requested a review from a team as a code owner July 17, 2023 16:09
@mikeash
Copy link
Contributor Author

mikeash commented Jul 17, 2023

@swift-ci please test

@mikeash
Copy link
Contributor Author

mikeash commented Jul 17, 2023

@swift-ci please test linux platform

@mikeash mikeash merged commit ae5a1a9 into swiftlang:release/5.9 Jul 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants