-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Tracking Issue for control-flow enforcement technology (CET) #93754
Comments
Add support for control-flow protection This change adds a flag for configuring control-flow protection in the LLVM backend. In Clang, this flag is exposed as `-fcf-protection` with options `none|branch|return|full`. This convention is followed for `rustc`, though as a codegen option: `rustc -Z cf-protection=<none|branch|return|full>`. Tracking issue for future work is rust-lang#93754.
In distributions that already elect to build everything with CET enabled by default, we would want to turn it on by default in the rustc compiler and use it for the standard library, and everything by default. The question is simply as to when. And what can be done to get there. I wonder if we could attempt rebuilding all packages with CET in the distribution to see how far the coverage goes. |
I don't see any way we could conditionally-default CET for rustup toolchains, but I think the way to go is to make it a rustbuild option, for such distributions to use when building their own Rust toolchain. |
one issue: |
If these are going to be independent compiler flags and not, say, target features, then yes, it may be a good idea to coalesce these. At least, certainly when the feature is functionally identical (e.g. |
Could we get a better summary of the status is here? There is this issue (cc @abrown), a tracking issue with no content for My feeling is that since |
@tgross35 I just updated #113369 with a link to a Zulip thread regarding merging with |
Thanks for the update Jacob, I think following up on Zulip is a good direction to go toward getting this done 👍 |
This is a tracking issue for standardizing the control-flow enforcement technology (CET) flag,
cf-protection
.About tracking issues
Tracking issues are used to record the overall progress of implementation.
They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions.
A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature.
Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.
Steps
cf-protection
cf-protection
flag as a-C
codegen flagUnresolved Questions
cf-guard
,cf-protection
,branch-protection
) under a common flag interfacecf-protection
by defaultIf we do build the standard libraries with
cf-protection
enabled, any assembly code in the libraries will need to be manually checked to see to it that when this flag is set, ENDBR* instructions are inserted in the right places.Implementation history
See #93439.
The text was updated successfully, but these errors were encountered: