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

-Ccontrol-flow-guard should raise an error on unsupported platforms #91060

Open
nagisa opened this issue Nov 19, 2021 · 1 comment
Open

-Ccontrol-flow-guard should raise an error on unsupported platforms #91060

nagisa opened this issue Nov 19, 2021 · 1 comment
Labels
A-security Area: Security (example: address space layout randomization). C-bug Category: This is a bug. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@nagisa
Copy link
Member

nagisa commented Nov 19, 2021

Right now specifying -Ccontrol-flow-guard and targetting a non-msvc platform will silently ignore the -Ccontrol-flow-guard option. Given the purpose of the flag and the audience Rust targets, I think this is an ill-considered behaviour. Especially of concern I think is when a non-MSVC windows target is used. An engineer might think the mitigations are enabled and the code would work fine in their testing, possibly only because the mitigations were never really turned on!

I believe that mitigation-related flags are sensitive enough to warrant an error when rustc isn't able to implement those mitigations for the artifact.

@nagisa nagisa added the C-bug Category: This is a bug. label Nov 19, 2021
@nagisa nagisa changed the title -Ccontrol-flow-guard should raise an error on unsupported platforms -Ccontrol-flow-guard should raise an error on unsupported platforms Nov 19, 2021
@nagisa
Copy link
Member Author

nagisa commented Nov 19, 2021

cc #68793

@inquisitivecrystal inquisitivecrystal added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. A-security Area: Security (example: address space layout randomization). labels Nov 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-security Area: Security (example: address space layout randomization). C-bug Category: This is a bug. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

2 participants