-
Notifications
You must be signed in to change notification settings - Fork 13.3k
[PAC] Add support for __ptrauth type qualifier #100830
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
Merged
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
51c21ae
[PAC] Add support for __ptrauth type qualifier
ahatanak d0021ea
Fix coding style violations
ahatanak 66c1f79
Revert unnecessary change
ahatanak 73a2422
Fix coding style violations
ahatanak f098322
Strip qualifiers when evaluating a reference as an rvalue
ahatanak a760923
Resign pointer when materializing temporary
ahatanak d64227d
Address review comments
ahatanak a8c8554
Address review comments
ahatanak ad7f94e
Run tests with triple aarch64-linux-gnu
ahatanak 0868bf3
Merge remote-tracking branch 'origin/main' into ptrauth-qualifier
ahatanak c343b0e
Fix check strings
ahatanak 8f2fa5a
Merge remote-tracking branch 'origin/main' into ptrauth-qualifier
ahatanak fe01536
Remove __ptrauth_restricted_intptr from docs and diagnostic message
ahatanak b6adace
Merge branch 'main' into ptrauth-qualifier
ahatanak c965ad0
Address review comments
ahatanak ae8a37e
Use enum_select
ahatanak c95c9dd
Address review comments
ahatanak 636e815
Add tests for rejecting template parameters being passed to __ptrauth
ahatanak 02299cb
Add test for _Generic, overloadable functions, and arrays
ahatanak 24f33cd
Add tests for constexpr, lambda, and concept
ahatanak 9cbf8b0
Add more tests for concept
ahatanak 45e5b93
Implement mangling/demangling __ptrauth on Windows
ahatanak File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We seem to be missing mangling for Microsoft; should we be using a vendor mangling there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AaronBallman we'd need MS to decide what their mangling would be - if it is to be different from this, or if MS ever want to support ptrauth?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, I missed the question that was here, but this does still need to be addressed.
We don't need MS to be involved, we can pick our own mangling and try to avoid potential conflicts by making it ugly (we do this for plenty of other extensions). But we're missing test coverage because we have no C++ tests for mangling or demangling (Microsoft or Itanium). I think we're missing the demangling implementation entirely, but we lately have been trying to get folks to do them at the same time so the demangler stays closer in sync with the mangler.
(Test coverage would be: CodeGen tests with an Itanium and a Microsoft ABI making sure we emit the expected manglings in C++ with a FileCheck test +
llvm/test/Demangle
tests to make sure the generated manglings will demangle back to an expected signature.)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Demangling already works for Itanium, though the qualifier might appear a little odd (it resembles a template instantiation).
For example: