gh-112301: Update disable safety and enable slow safety configure options documentation#122758
Conversation
Doc/using/configure.rst
Outdated
| @@ -911,17 +911,31 @@ Security Options | |||
|
|
|||
| Disable compiler options that are recommended by `OpenSSF`_ for security reasons with no performance overhead. | |||
There was a problem hiding this comment.
| Disable compiler options that are recommended by `OpenSSF`_ for security reasons with no performance overhead. | |
| Disable compiler options that are `recommended by OpenSSF`_ for security reasons with no performance overhead. |
Doc/using/configure.rst
Outdated
| * `-fstack-protector-strong`_: Enable run-time checks for stack-based buffer overflows. | ||
| * `-Wtrampolines`_: Enable warnings about trampolines that require executable stacks. | ||
|
|
||
| .. _OpenSSF: https://github.com/ossf/wg-best-practices-os-developers/blob/main/docs/Compiler-Hardening-Guides/Compiler-Options-Hardening-Guide-for-C-and-C++.md |
There was a problem hiding this comment.
| .. _OpenSSF: https://github.com/ossf/wg-best-practices-os-developers/blob/main/docs/Compiler-Hardening-Guides/Compiler-Options-Hardening-Guide-for-C-and-C++.md | |
| .. _recommended by OpenSSF: https://github.com/ossf/wg-best-practices-os-developers/blob/main/docs/Compiler-Hardening-Guides/Compiler-Options-Hardening-Guide-for-C-and-C++.md |
Doc/using/configure.rst
Outdated
| When this option is enabled, CPython will not be built with the compiler options listed below. | ||
|
|
||
| .. _OpenSSF: https://openssf.org/ | ||
| Compiler options that are disabled with this option: |
There was a problem hiding this comment.
| Compiler options that are disabled with this option: | |
| The following compiler options are disabled with :option:`!--disable-safety`: |
Doc/using/configure.rst
Outdated
| If this option is not enabled, CPython will not be built based on safety compiler options which performance impact. | ||
| When this option is enabled, CPython will be built with the compiler options listed below. | ||
|
|
||
| Compiler options that are enabled with this option: |
There was a problem hiding this comment.
| Compiler options that are enabled with this option: | |
| The following compiler options are enabled with :option:`!--enable-slower-safety`: |
Doc/using/configure.rst
Outdated
| * `-D_FORTIFY_SOURCE=3`_: Fortify sources with compile- and run-time checks for unsafe libc usage and buffer overflows. | ||
|
|
||
| .. _OpenSSF: https://openssf.org/ | ||
| .. _OpenSSF: https://github.com/ossf/wg-best-practices-os-developers/blob/main/docs/Compiler-Hardening-Guides/Compiler-Options-Hardening-Guide-for-C-and-C++.md |
There was a problem hiding this comment.
You don't need to (and shouldn't) redefine link targets in the same document
| .. _OpenSSF: https://github.com/ossf/wg-best-practices-os-developers/blob/main/docs/Compiler-Hardening-Guides/Compiler-Options-Hardening-Guide-for-C-and-C++.md |
There was a problem hiding this comment.
Removed superfluous link
Doc/using/configure.rst
Outdated
|
|
||
| .. option:: --enable-slower-safety | ||
|
|
||
| Enable compiler options that are recommended by `OpenSSF`_ for security reasons which require overhead. |
There was a problem hiding this comment.
| Enable compiler options that are recommended by `OpenSSF`_ for security reasons which require overhead. | |
| Enable compiler options that are `recommended by OpenSSF`_ for security reasons which require overhead. |
There was a problem hiding this comment.
Can we introduce the options here, too? or separate PR?
https://github.com/python/cpython/blob/main/Doc/whatsnew/3.14.rst
corona10
left a comment
There was a problem hiding this comment.
lgtm from the view of non-native speaker :)
We could probably do a separate PR. We will be enabling strictly warning options once the devguide is updated that can be included there as well. |
|
@nohlson does this need backports? A |
No we do not need to backport these changes |
…ble-safety`` and ``--enable-slower-safety``) (python#122758) Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
These changes add more information to docs related to the new configure options
--disable-safetyand--enable-slow-safety. Links in docs point directly to the OpenSSF guidance for particular compiler options suggested in this comment.📚 Documentation preview 📚: https://cpython-previews--122758.org.readthedocs.build/