-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Please add retpoline support. #54637
Comments
Some simple testing in clang shows that |
cc @rust-lang/compiler |
I'm no security expert, but from what I can tell from the LLVM code, this specific Because it just so happens we have a PR which will disable the PLT by default and it seems that it might reduce the performance impact of retpoline (and reduce the attack surface). If you also build your C/C++ libraries with a global |
We should still support retpolines when @plt is used. That being said, it seems to me that this is almost entirely a linker’s job (i.e. all of the support is being added to EDIT: OTOH from what @alexcrichton said above, it probably does need compiler support, but still no explicit changes to rustc are necessary. |
Thanks all! I'll take what's written here and see if I can plumb the appropriate flags through cargo etc to get retpolines in the generated binary. I'll report back with results. |
Heya, any news on this one @dancrossnyc ? |
Sorry for the delayed response; I was traveling over the new year. We put this in a while back and it seems to be working as expected. Thanks, all! |
For a project at Google, we need retpoline support. Taylor Cramer suggested I open an issue; my initial search didn't reveal any pre-existing issues that seemed particularly relevant. There was a reddit thread that stalled after identifying some blocking issues (LLD integration, LLVM upgrades, etc) all of which have, I believe, subsequently been addressed. https://www.reddit.com/r/rust/comments/7saomi/status_of_spectre_variant_2_mitigation_in_rust/
As I understand it, the heavy lifting for this is in LLVM and it simply needs to be plumbed through.
Put another way, just as clang provides
-mretpoline
(https://reviews.llvm.org/D41723), I'm looking for something similar in the Rust toolchain.Thanks!
The text was updated successfully, but these errors were encountered: