-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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
win,build: add option to enable cfg #56605
base: main
Are you sure you want to change the base?
win,build: add option to enable cfg #56605
Conversation
Review requested:
|
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.
LGTM but would be worthwhile to expand on the motivation a bit in the PR or the commit message for folks unfamiliar with cfg
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.
I would rather a more descriptive name than "cfg" was used in common.gypi
and configure
(I'm less concerned with vcbuild.bat
).
Are there any plans to enable this by default in the future?
No plan yet. CFG adds extra checks to the code to increase security. Therefore, these checks have a runtime cost in certain situations. Instead of enabling it by default, it might be enabled and released as a separate executable. |
Co-authored-by: Richard Lau <[email protected]>
Co-authored-by: Richard Lau <[email protected]>
ebeaa73
to
9ddff4a
Compare
I've updated the PR description to give more information about CFG. |
This adds an option to
vcbuild.bat
to compile with CFG (Control Flow Guard).CFG is a programming or security concept used to ensure that the execution of a program follows its intended flow and prevents unauthorized or unintended behavior. It is often used to detect and mitigate attacks that exploit vulnerabilities, such as control flow hijacking, which occurs when an attacker manipulates the program’s control flow to execute malicious code.
More information about the CFG can be found at https://learn.microsoft.com/en-us/windows/win32/secbp/control-flow-guard
Fixes: #42100