Skip to content

Conversation

CrooseGit
Copy link
Contributor

Extends existing support for AArch64 branch protection to include support for Guarded Control Stacks.

@rustbot
Copy link
Collaborator

rustbot commented Sep 8, 2025

r? @davidtwco

rustbot has assigned @davidtwco.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-run-make Area: port run-make Makefiles to rmake.rs PG-exploit-mitigations Project group: Exploit mitigations S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Sep 8, 2025
@rustbot
Copy link
Collaborator

rustbot commented Sep 8, 2025

Some changes occurred in src/doc/unstable-book/src/compiler-flags/branch-protection.md

cc @rust-lang/project-exploit-mitigations, @rcvalle

@davidtwco
Copy link
Member

I've reviewed this internally so will reroll. GCS is exposed in Clang through their -mbranch-protection flag, so this just mirrors that like the rest of this flag.

r? compiler

@rustbot rustbot assigned nnethercote and unassigned davidtwco Sep 8, 2025
Copy link
Member

@Urgau Urgau left a 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.

View changes since this review

@Urgau
Copy link
Member

Urgau commented Sep 8, 2025

r=me with the updated test output and CI green

r? Urgau
@bors delegate+

@bors
Copy link
Collaborator

bors commented Sep 8, 2025

✌️ @CrooseGit, you can now approve this pull request!

If @Urgau told you to "r=me" after making some further change, please make that change, then do @bors r=@Urgau

@rust-log-analyzer

This comment has been minimized.

Copy link
Contributor

@nnethercote nnethercote left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@CrooseGit CrooseGit force-pushed the dev/reucru01/AArch64-enable-GCS branch from b50c4db to d949360 Compare September 9, 2025 10:11
@rust-log-analyzer

This comment has been minimized.

@CrooseGit

This comment was marked as resolved.

@Urgau
Copy link
Member

Urgau commented Sep 9, 2025

Does your local rustc uses LLVM 19 (like the job)? Or are you building LLVM locally/with download-ci-llvm?

@davidtwco
Copy link
Member

Checked locally and it's the LLVM version that is causing this, just add a //@ min-llvm-version: 21 directive only for the GCS revision (or //@ min-llvm-version: 20 if it works with that version).

@CrooseGit CrooseGit force-pushed the dev/reucru01/AArch64-enable-GCS branch from d949360 to 7ade636 Compare September 10, 2025 10:25
@rust-log-analyzer

This comment has been minimized.

@rustbot rustbot added A-CI Area: Our Github Actions CI A-testsuite Area: The testsuite used to check the correctness of rustc T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels Sep 10, 2025
@CrooseGit
Copy link
Contributor Author

@bors r=@Urgau

Thank you

@bors
Copy link
Collaborator

bors commented Sep 11, 2025

📌 Commit 661289b has been approved by Urgau

It is now in the queue for this repository.

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Sep 19, 2025
…<try>

Extends AArch64 branch protection support to include GCS

try-job: *aarch64*
@rust-log-analyzer

This comment has been minimized.

@rust-bors
Copy link

rust-bors bot commented Sep 19, 2025

💔 Test for d260a23 failed: CI. Failed jobs:

@CrooseGit CrooseGit force-pushed the dev/reucru01/AArch64-enable-GCS branch from f043fb8 to e02bd51 Compare September 19, 2025 14:06
@Urgau
Copy link
Member

Urgau commented Sep 19, 2025

@bors try jobs=aarch64

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Sep 19, 2025
…<try>

Extends AArch64 branch protection support to include GCS

try-job: *aarch64*
@rust-log-analyzer

This comment has been minimized.

@rust-bors
Copy link

rust-bors bot commented Sep 19, 2025

💔 Test for c3587c9 failed: CI. Failed jobs:

@CrooseGit CrooseGit force-pushed the dev/reucru01/AArch64-enable-GCS branch from e02bd51 to bb893df Compare September 22, 2025 10:39
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, and/or GCC15 is the default.
@CrooseGit CrooseGit force-pushed the dev/reucru01/AArch64-enable-GCS branch from bb893df to 08020de Compare September 23, 2025 12:59
@davidtwco
Copy link
Member

@bors r=Urgau,davidtwco rollup-

@CrooseGit thinks that the CI failures should be resolved now and this will be able to be merged

@bors
Copy link
Collaborator

bors commented Sep 23, 2025

📌 Commit 08020de has been approved by Urgau,davidtwco

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 23, 2025
Zalathar added a commit to Zalathar/rust that referenced this pull request Sep 24, 2025
@davidtwco
Copy link
Member

@bors rollup=never

Failed in rollups a bunch previously

@bors
Copy link
Collaborator

bors commented Sep 24, 2025

⌛ Testing commit 08020de with merge 15283f6...

@bors
Copy link
Collaborator

bors commented Sep 24, 2025

☀️ Test successful - checks-actions
Approved by: Urgau,davidtwco
Pushing 15283f6 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Sep 24, 2025
@bors bors merged commit 15283f6 into rust-lang:master Sep 24, 2025
11 checks passed
@rustbot rustbot added this to the 1.92.0 milestone Sep 24, 2025
Copy link
Contributor

What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing e9385f9 (parent) -> 15283f6 (this PR)

Test differences

Show 30 test diffs

Stage 1

  • [assembly] tests/assembly-llvm/aarch64-pointer-auth.rs#GCS: [missing] -> ignore (ignored when the LLVM version 20.1.2 is older than 21.0.0) (J0)
  • [codegen] tests/codegen-llvm/branch-protection.rs#GCS: [missing] -> pass (J0)

Stage 2

  • [assembly] tests/assembly-llvm/aarch64-pointer-auth.rs#GCS: [missing] -> ignore (ignored when the LLVM version 20.1.8 is older than 21.0.0) (J1)
  • [assembly] tests/assembly-llvm/nvptx-safe-naming.rs#LLVM21: ignore (ignored when the LLVM version 20.1.2 is older than 21.0.0) -> ignore (ignored when the LLVM version 20.1.8 is older than 21.0.0) (J1)
  • [assembly] tests/assembly-llvm/sanitizer/kcfi/emit-arity-indicator.rs#x86_64: ignore (ignored when the LLVM version 20.1.2 is older than 21.0.0) -> ignore (ignored when the LLVM version 20.1.8 is older than 21.0.0) (J1)
  • [codegen] tests/codegen-llvm/dead_on_return.rs: ignore (ignored when the LLVM version 20.1.2 is older than 21.0.0) -> ignore (ignored when the LLVM version 20.1.8 is older than 21.0.0) (J1)
  • [codegen] tests/codegen-llvm/enum/enum-discriminant-eq.rs#LLVM21: ignore (ignored when the LLVM version 20.1.2 is older than 21.0.0) -> ignore (ignored when the LLVM version 20.1.8 is older than 21.0.0) (J1)
  • [codegen] tests/codegen-llvm/issues/issue-101082.rs#x86-64-v3: ignore (ignored when the LLVM version 20.1.2 is older than 21.0.0) -> ignore (ignored when the LLVM version 20.1.8 is older than 21.0.0) (J1)
  • [codegen] tests/codegen-llvm/issues/issue-122734-match-eq.rs: ignore (ignored when the LLVM version 20.1.2 is older than 21.0.0) -> ignore (ignored when the LLVM version 20.1.8 is older than 21.0.0) (J1)
  • [codegen] tests/codegen-llvm/issues/matches-logical-or-141497.rs: ignore (ignored when the LLVM version 20.1.2 is older than 21.0.0) -> ignore (ignored when the LLVM version 20.1.8 is older than 21.0.0) (J1)
  • [codegen] tests/codegen-llvm/issues/saturating-sub-index-139759.rs: ignore (ignored when the LLVM version 20.1.2 is older than 21.0.0) -> ignore (ignored when the LLVM version 20.1.8 is older than 21.0.0) (J1)
  • [codegen] tests/codegen-llvm/option-niche-eq.rs#LLVM21: ignore (ignored when the LLVM version 20.1.2 is older than 21.0.0) -> ignore (ignored when the LLVM version 20.1.8 is older than 21.0.0) (J1)
  • [codegen] tests/codegen-llvm/read-only-capture-opt.rs: ignore (ignored when the LLVM version 20.1.2 is older than 21.0.0) -> ignore (ignored when the LLVM version 20.1.8 is older than 21.0.0) (J1)
  • [codegen] tests/codegen-llvm/sanitizer/kcfi/add-kcfi-arity-flag.rs#x86_64: ignore (ignored when the LLVM version 20.1.2 is older than 21.0.0) -> ignore (ignored when the LLVM version 20.1.8 is older than 21.0.0) (J1)
  • [debuginfo-gdb] tests/debuginfo/include_string.rs: pass -> ignore (ignored when the GDB version is between 15.0 - 99.0) (J2)
  • [debuginfo-gdb] tests/debuginfo/macro-stepping.rs: ignore (ignored when the GDB version is lower than 13.0) -> ignore (ignored when the architecture is aarch64) (J2)
  • [debuginfo-gdb] tests/debuginfo/method-on-enum.rs: ignore (ignored when the GDB version is lower than 13.0) -> pass (J2)
  • [debuginfo-gdb] tests/debuginfo/multiline-calls.rs: ignore (ignored when the GDB version is lower than 16.0) -> pass (J2)
  • [debuginfo-gdb] tests/debuginfo/option-like-enum.rs: ignore (ignored when the GDB version is lower than 13.0) -> pass (J2)
  • [debuginfo-gdb] tests/debuginfo/strings-and-strs.rs: ignore (ignored when the GDB version is lower than 14.0) -> pass (J2)
  • [debuginfo-gdb] tests/debuginfo/unsized.rs: pass -> ignore (ignored when the GDB version is between 13.1 - 99.0) (J2)
  • [debuginfo-gdb] tests/debuginfo/vec-slices.rs: pass -> ignore (ignored when the GDB version is between 15.0 - 99.0) (J2)
  • [assembly] tests/assembly-llvm/aarch64-pointer-auth.rs#GCS: [missing] -> pass (J3)
  • [assembly] tests/assembly-llvm/aarch64-pointer-auth.rs#GCS: [missing] -> ignore (ignored when the target vendor is Apple ((XCode version needs updating))) (J4)
  • [run-make] tests/run-make/pointer-auth-link-with-c: pass -> ignore (ignored when the target vendor is Apple) (J4)
  • [run-make] tests/run-make/pointer-auth-link-with-c-lto-clang: ignore (ignored when RUSTBUILD_FORCE_CLANG_BASED_TESTS is not set) -> ignore (ignored when the target vendor is Apple) (J4)
  • [assembly] tests/assembly-llvm/aarch64-pointer-auth.rs#GCS: [missing] -> ignore (ignored when the LLVM version 20.1.2 is older than 21.0.0) (J5)
  • [codegen] tests/codegen-llvm/branch-protection.rs#GCS: [missing] -> pass (J6)

Additionally, 2 doctest diffs were found. These are ignored, as they are noisy.

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 15283f6fe95e5b604273d13a428bab5fc0788f5a --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. aarch64-gnu-debug: 4081.5s -> 9697.6s (137.6%)
  2. aarch64-gnu: 6710.2s -> 8865.2s (32.1%)
  3. pr-check-1: 1474.0s -> 1857.3s (26.0%)
  4. aarch64-gnu-llvm-20-2: 2154.5s -> 2626.6s (21.9%)
  5. x86_64-gnu-llvm-20: 2361.1s -> 2789.7s (18.2%)
  6. dist-apple-various: 3663.1s -> 4259.5s (16.3%)
  7. aarch64-gnu-llvm-20-1: 3383.6s -> 3921.4s (15.9%)
  8. pr-check-2: 2180.3s -> 2478.9s (13.7%)
  9. i686-gnu-nopt-1: 7277.3s -> 8090.1s (11.2%)
  10. i686-gnu-2: 5482.1s -> 6011.9s (9.7%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (15283f6): comparison URL.

Overall result: ❌✅ regressions and improvements - no action needed

@rustbot label: -perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.2% [0.2%, 0.2%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.3% [-0.3%, -0.3%] 1
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary -0.7%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
2.1% [2.1%, 2.1%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-3.5% [-3.5%, -3.5%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.7% [-3.5%, 2.1%] 2

Cycles

Results (secondary -3.1%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.1% [-3.5%, -2.7%] 2
All ❌✅ (primary) - - 0

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 471.559s -> 471.213s (-0.07%)
Artifact size: 387.91 MiB -> 387.83 MiB (-0.02%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-CI Area: Our Github Actions CI A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc merged-by-bors This PR was explicitly merged by bors. PG-exploit-mitigations Project group: Exploit mitigations S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.