-
Notifications
You must be signed in to change notification settings - Fork 13.8k
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
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.
tests/ui/invalid-compile-flags/branch-protection-missing-pac-ret.BADFLAGS.stderr
Outdated
Show resolved
Hide resolved
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.
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).
Rollup of 12 pull requests Successful merges: - #146338 (Extends AArch64 branch protection support to include GCS) - #146344 (tests/codegen-llvm: Make rust-abi-arch-specific-adjustment portable) - #146402 (interpret: fix overlapping aggregate initialization) - #146405 (Add relnotes for 1.90.0) - #146530 (rustc_codegen_llvm: Adjust RISC-V inline assembly's clobber list) - #146533 (Note some previous attempts to change the Default impl for `[T; 0]`) - #146539 (fix 404 MCP link) - #146546 (Switch `std::vec::PeekMut::pop` from self to this parameter.) - #146549 (On FreeBSD, use readdir instead of readdir_r) - #146559 (Fix typo in error message) - #146563 (bootstrap.py: disable incremental build for bootstrap in CI) - #146576 (opt-dist: don't set `RUST_LOG=collector=debug`) r? `@ghost` `@rustbot` modify labels: rollup
dbb94e7
to
3c9eda0
Compare
Let's do a try build of all the @bors try jobs=aarch64 |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment has been minimized.
This comment has been minimized.
…<try> Extends AArch64 branch protection support to include GCS try-job: *aarch64*
This comment has been minimized.
This comment has been minimized.
💔 Test for 6f90524 failed: CI. Failed jobs:
|
This comment was marked as outdated.
This comment was marked as outdated.
- Adds option to rustc config to enable GCS - Passes `guarded-control-stack` flag to llvm if enabled
GCS support was added to GCC in version 15, thus the rmake test for this patch requires GCC15 Similarly, the ubuntu version is updated so the newer clang version is available.
3c9eda0
to
b984bb5
Compare
This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
@CrooseGit: 🔑 Insufficient privileges: not in try users |
The job Click to see the possible cause of the failure (guessed by this bot)
|
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
bzip2 \ | ||
g++ \ | ||
g++-15 \ |
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 like installing a specific version of g++
doesn't provide the cc
binary by default.
I tested adding the update-alternatives
to provide gcc
, cc
, g++
and cxx
and that fixes the issue about cc
not being provided.
# Link standard gcc binary to the g++-15 ones
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-15 10 \
&& update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-15 10 \
&& update-alternatives --install /usr/bin/cc cc /usr/bin/gcc-15 30 \
&& update-alternatives --install /usr/bin/cxx cxx /usr/bin/g++-15 30
(to be added after the install in this Dockerfile)
Extends existing support for AArch64 branch protection to include support for Guarded Control Stacks.