[gcc(refs/users/aoliva/heads/testme)] hardcfr: optionally disable in leaf functions [ada doc]

Alexandre Oliva aoliva@gcc.gnu.org
Fri Jun 23 20:13:12 GMT 2023


https://gcc.gnu.org/g:191500d941c4048953c534f61e2e937359591fc7

commit 191500d941c4048953c534f61e2e937359591fc7
Author: Alexandre Oliva <oliva@adacore.com>
Date:   Fri Jun 23 17:10:13 2023 -0300

    hardcfr: optionally disable in leaf functions [ada doc]
    
    Document -fhardcfr-skip-leaf.
    
    
    for  gcc/ada/ChangeLog
    
            * doc/gnat_rm/security_hardening_features.rst (Control Flow
            Hardening): Document -fhardcfr-skip-leaf.

Diff:
---
 gcc/ada/doc/gnat_rm/security_hardening_features.rst | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/gcc/ada/doc/gnat_rm/security_hardening_features.rst b/gcc/ada/doc/gnat_rm/security_hardening_features.rst
index e1de80d072b..283933cca50 100644
--- a/gcc/ada/doc/gnat_rm/security_hardening_features.rst
+++ b/gcc/ada/doc/gnat_rm/security_hardening_features.rst
@@ -363,6 +363,11 @@ basic blocks take note as control flows through them, and, before
 returning, subprograms verify that the taken notes are consistent with
 the control-flow graph.
 
+The performance impact of verification on leaf subprograms can be much
+higher, while the averted risks are much lower on them.
+Instrumentation can be disabled for leaf subprograms with
+:switch:`-fhardcfr-skip-leaf`.
+
 Functions with too many basic blocks, or with multiple return points,
 call a run-time function to perform the verification.  Other functions
 perform the verification inline before returning.


More information about the Gcc-cvs mailing list