Skip to content
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

Add support for LLVM SafeStack #112000

Merged
merged 2 commits into from
May 28, 2023
Merged

Add support for LLVM SafeStack #112000

merged 2 commits into from
May 28, 2023

Conversation

wesleywiser
Copy link
Member

@wesleywiser wesleywiser commented May 26, 2023

Adds support for LLVM SafeStack which provides backward edge control
flow protection by separating the stack into two parts: data which is
only accessed in provable safe ways is allocated on the normal stack
(the "safe stack") and all other data is placed in a separate allocation
(the "unsafe stack").

SafeStack support is enabled by passing -Zsanitizer=safestack.

cc @rcvalle #39699

@wesleywiser wesleywiser added the PG-exploit-mitigations Project group: Exploit mitigations label May 26, 2023
@rustbot
Copy link
Collaborator

rustbot commented May 26, 2023

r? @GuillaumeGomez

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels May 26, 2023
@rustbot
Copy link
Collaborator

rustbot commented May 26, 2023

These commits modify compiler targets.
(See the Target Tier Policy.)

@rust-log-analyzer

This comment has been minimized.

@rcvalle
Copy link
Member

rcvalle commented May 26, 2023

LGTM. Thank you for your time and for working on this, @wesleywiser! Much appreciated.

@rust-log-analyzer

This comment has been minimized.

Adds support for LLVM [SafeStack] which provides backward edge control
flow protection by separating the stack into two parts: data which is
only accessed in provable safe ways is allocated on the normal stack
(the "safe stack") and all other data is placed in a separate allocation
(the "unsafe stack").

SafeStack support is enabled by passing `-Zsanitizer=safestack`.

[SafeStack]: https://clang.llvm.org/docs/SafeStack.html
@GuillaumeGomez
Copy link
Member

r? @Amanieu

@rustbot rustbot assigned Amanieu and unassigned GuillaumeGomez May 27, 2023
@Amanieu
Copy link
Member

Amanieu commented May 27, 2023

@bors r+

@bors
Copy link
Contributor

bors commented May 27, 2023

📌 Commit 019d75b has been approved by Amanieu

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-review Status: Awaiting review from the assignee but also interested parties. labels May 27, 2023
@bors
Copy link
Contributor

bors commented May 28, 2023

⌛ Testing commit 019d75b with merge 2560b80...

@bors
Copy link
Contributor

bors commented May 28, 2023

☀️ Test successful - checks-actions
Approved by: Amanieu
Pushing 2560b80 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label May 28, 2023
@bors bors merged commit 2560b80 into rust-lang:master May 28, 2023
@rustbot rustbot added this to the 1.72.0 milestone May 28, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (2560b80): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

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

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

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

Cycles

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

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

Binary size

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

Bootstrap: 645.767s -> 644.189s (-0.24%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants