-
Notifications
You must be signed in to change notification settings - Fork 14k
-Zharden-sls flag (target modifier) added to enable mitigation against straight line speculation (SLS) #136597
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: main
Are you sure you want to change the base?
Conversation
This comment has been minimized.
This comment has been minimized.
|
Some changes occurred in compiler/rustc_codegen_gcc |
|
First commit adds retpoline feature, but PR descriptions says about sls. |
Yes, first commit is in another PR #135927. |
|
Marking this as blocked on #135927 |
|
I filed an MCP for this flag: rust-lang/compiler-team#869 |
|
☔ The latest upstream changes (presumably #141232) made this pull request unmergeable. Please resolve the merge conflicts. |
| warning: target feature `retpoline-external-thunk` cannot be enabled with `-Ctarget-feature`: use `x86-retpoline` target modifier flag instead | ||
| | | ||
| = note: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! | ||
| = note: for more information, see issue #116344 <https://github.com/rust-lang/rust/issues/116344> | ||
|
|
||
| warning: 1 warning emitted |
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.
Why is this possible at all?
| //@ compile-flags: --target=x86_64-unknown-linux-gnu --crate-type=lib | ||
| //@ needs-llvm-components: x86 | ||
| //@ [by_flag]compile-flags: -Zharden-sls=all | ||
| //@ [by_feature]compile-flags: -Ctarget-feature=+harden-sls-ijmp,+harden-sls-ret |
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.
These should not be set by -Ctarget-feature.
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.
@azhogin it would be great if we could make these hard errors now instead of an FCW
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.
Changed to be hard error. Also it requires to add non-aux-compiler-flags directive for tests (related issue described here #147881). To workaround error generated at minicore auxiliary build.
Thanks! |
|
In the Rust <-> Rust for Linux sync call we were wondering about the status on this one: I think what is open is the review above: #136597 (comment). |
|
☔ The latest upstream changes (presumably #147803) made this pull request unmergeable. Please resolve the merge conflicts. |
|
This PR was rebased onto a different main 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. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Some changes occurred in src/tools/compiletest cc @jieyouxu |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…t straight line speculation (SLS)
|
The rustc-dev-guide subtree was changed. If this PR only touches the dev guide consider submitting a PR directly to rust-lang/rustc-dev-guide otherwise thank you for updating the dev guide with your changes. |
Rebased to main, the review comment addressed. |
|
@rustbot review |
Flag (target modifier) to mitigate against straight line speculation (SLS).
-Zharden-sls=[none|all|return|indirect-jmp].The flag enables the related features:
+harden-sls-ijmp,+harden-sls-ret.The flag is tracked as a target modifier to be equal between linked crates.
Tracking issue: #116851