-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Runtime][IRGen] Sign type context descriptor pointers. #67168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Runtime][IRGen] Sign type context descriptor pointers. #67168
Conversation
85b1508
to
69662f3
Compare
@swift-ci please test |
1b5abc2
to
1a5ff19
Compare
@swift-ci please test |
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
1a5ff19
to
fe7e13b
Compare
@swift-ci please test |
could you run the preset that corresponds to https://ci.swift.org/job/oss-swift_tools-RA_stdlib-DA_test-device-non_executable/ It could be that some tests on iphoneos-arm64e might need updating |
preset=buildbot,tools=RA,stdlib=RD,test=non_executable |
From the failures I got before, I think PR testing covers iOS ARM64e non-executable tests, but I'll run that preset too just to make sure. |
@swift-ci please test windows platform |
@swift-ci please test windows |
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