-
-
Notifications
You must be signed in to change notification settings - Fork 15.1k
Pointer authentication config and user facing options #156712
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
Open
jchlanda
wants to merge
22
commits into
rust-lang:main
Choose a base branch
from
jchlanda:jakub/pac_config
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+2,543
−89
Open
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
0ad3bc9
Introduce `aarch64-unknown-linux-pauthtest`
jchlanda 9a37be6
New signature of `get_fn_addr`, teach Rust how to sign fn pointers
jchlanda b08d331
Add pauth attributes and first IR tests
jchlanda 927dcc4
Add support for init/fini signing and correctly sign extern weak globals
jchlanda aadc196
Teach bootstrap how to build rust_test_helpers for pauthtest
jchlanda bbcab8b
Override static libraries and warn on linking against that kind of libs
jchlanda 4b95452
Correctly set f128 math support for pauthtest
jchlanda 78ffb3d
Use target_env = "musl" & target_abi = "pauthtest"
jchlanda 0132d3f
PR feedback: Introduce
jchlanda 6952603
PR feedback: Attributes
jchlanda 5e9f0b9
PR feedback: Init/Fini
jchlanda 4f72ead
PR feedback: Teach bootstrap
jchlanda 1a8e2e8
PR feedback: Override static
jchlanda f4a530d
PR feedback: Use target_env
jchlanda f3f29ec
Add library support for `aarch64-unknown-linux-pauthtest`
jchlanda ade83e7
Use target_env = "musl" & target_abi = "pauthtest" instead of env
jchlanda 7b5bbb1
Update landing pad to use addr()
jchlanda e062725
Pointer authentication config and user facing options
jchlanda 12f9959
Extend version support with C++ specifics
jchlanda b11d2e6
Document -Zpointer-authentication option
jchlanda 3a1b2ee
PR feedback
jchlanda d59f1be
PR feedback
jchlanda 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
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.
Uh oh!
There was an error while loading. Please reload this page.
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.
Is this check needed? My understanding was that we define
schemaargument somewhere earlier in the call stack based on thecx.tcx.sess.pointer_authentication_functions(), and if it's not set, theschemawould just havekind == None.So, can we delete the check and instead add an assertion against schema kind not being none?
I might be missing smth, and if so - I would appreciate your explanation on this topic
View changes since the review
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.
Like I said above, I'd prefer to get rid of
Kindand rely onOption. Even grepping in clang shows it serves as binary switch: on/off. But if you think it will grow with time to cover multiple kinds, I'm not against it.What
pointer_authentication_functionsdoes is it checks if both pointer authentication config and function pointers schema are present.-Zpointer-authentication=-callswould result in the former being set, but not the later. Whether this would make for a sane use of the option is a different matter.