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

Alexandre Oliva aoliva@gcc.gnu.org
Thu Jun 8 10:43:23 GMT 2023


https://gcc.gnu.org/g:8385339fa873b83aa05d051fa70c024f067fa02a

commit 8385339fa873b83aa05d051fa70c024f067fa02a
Author: Alexandre Oliva <oliva@adacore.com>
Date:   Thu Jun 8 01:35:30 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 5c45fc2d42a..4ea38b14df1 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