-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Extends AArch64 branch protection support to include GCS #146338
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
base: master
Are you sure you want to change the base?
Extends AArch64 branch protection support to include GCS #146338
Conversation
- Adds option to rustc config to enable GCS - Passes `guarded-control-stack` flag to llvm if enabled
r? @davidtwco rustbot has assigned @davidtwco. Use |
Some changes occurred in src/doc/unstable-book/src/compiler-flags/branch-protection.md cc @rust-lang/project-exploit-mitigations, @rcvalle |
I've reviewed this internally so will reroll. GCS is exposed in Clang through their r? compiler |
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.
Seems pretty straightforward, and looks consistent with clang.
@@ -1,2 +1,2 @@ | |||
error: incorrect value `leaf` for unstable option `branch-protection` - a `,` separated combination of `bti`, `pac-ret`, followed by a combination of `pc`, `b-key`, or `leaf` was expected | |||
error: incorrect value `leaf` for unstable option `branch-protection` - a `,` separated combination of `bti`, `gcs`, `pac-ret`, followed by a combination of `pc`, `b-key`, or `leaf` was expected |
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.
(this will need to be blessed, as per the updated description)
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.
Ah yes, thank you. I have now fixed it.
r=me with the updated test output and CI green r? Urgau |
✌️ @CrooseGit, you can now approve this pull request! If @Urgau told you to " |
This comment has been minimized.
This comment has been minimized.
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.
Thanks, @Urgau!
b50c4db
to
d949360
Compare
This comment has been minimized.
This comment has been minimized.
This comment was marked as resolved.
This comment was marked as resolved.
Does your local |
Checked locally and it's the LLVM version that is causing this, just add a |
d949360
to
7ade636
Compare
This comment has been minimized.
This comment has been minimized.
…ble-GCS, r=Urgau Extends AArch64 branch protection support to include GCS Extends existing support for AArch64 branch protection to include support for [Guarded Control Stacks](https://community.arm.com/arm-community-blogs/b/architectures-and-processors-blog/posts/arm-a-profile-architecture-2022#guarded-control-stack-gcs:~:text=Extraction%20or%20tracking.-,Guarded%20Control%20Stack%20(GCS),-With%20the%202022).
Rollup of 16 pull requests Successful merges: - #145660 (initial implementation of the darwin_objc unstable feature) - #145895 (thread parking: fix docs and examples) - #146308 (support integer literals in `${concat()}`) - #146323 (check before test for hardware capabilites in bits 32~63 of usize) - #146332 (tidy: make behavior of extra-checks more uniform) - #146338 (Extends AArch64 branch protection support to include GCS) - #146374 (Update `browser-ui-test` version to `0.22.2`) - #146413 (Improve suggestion in case a bare URL is surrounded by brackets) - #146426 (Bump miow to 0.60.1) - #146432 (Implement `Socket::take_error` for Hermit) - #146433 (rwlock tests: fix miri macos test regression) - #146435 (Change the default value of `gcc.download-ci-gcc` to `true`) - #146439 (fix cfg for poison test macro) - #146448 ([rustdoc] Correctly handle literal search on paths) - #146449 (Fix `libgccjit` symlink when we build GCC locally) - #146455 (test: remove an outdated normalization for rustc versions) Failed merges: - #146389 (Convert `no_std` and `no_core` to the new attribute infrastructure) r? `@ghost` `@rustbot` modify labels: rollup
Probably failed in rollup: #146461 (comment) @bors r- |
@bors try jobs=x86_64-gnu-llvm-20-3 |
…<try> Extends AArch64 branch protection support to include GCS try-job: x86_64-gnu-llvm-20-3
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
💔 Test for a1acb51 failed: CI. Failed jobs:
|
GCS support was added to GCC in version 15, thus the rmake test for this patch requires GCC15
661289b
to
dbb94e7
Compare
…ble-GCS, r=Urgau Extends AArch64 branch protection support to include GCS Extends existing support for AArch64 branch protection to include support for [Guarded Control Stacks](https://community.arm.com/arm-community-blogs/b/architectures-and-processors-blog/posts/arm-a-profile-architecture-2022#guarded-control-stack-gcs:~:text=Extraction%20or%20tracking.-,Guarded%20Control%20Stack%20(GCS),-With%20the%202022).
…ble-GCS, r=Urgau Extends AArch64 branch protection support to include GCS Extends existing support for AArch64 branch protection to include support for [Guarded Control Stacks](https://community.arm.com/arm-community-blogs/b/architectures-and-processors-blog/posts/arm-a-profile-architecture-2022#guarded-control-stack-gcs:~:text=Extraction%20or%20tracking.-,Guarded%20Control%20Stack%20(GCS),-With%20the%202022).
Extends existing support for AArch64 branch protection to include support for Guarded Control Stacks.