]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: hardcfr: optionally disable in leaf functions
authorAlexandre Oliva <oliva@adacore.com>
Wed, 28 Jun 2023 04:36:53 +0000 (01:36 -0300)
committerMarc Poulhiès <poulhies@adacore.com>
Mon, 10 Jul 2023 12:41:39 +0000 (14:41 +0200)
Document -fhardcfr-skip-leaf.

gcc/ada/

* doc/gnat_rm/security_hardening_features.rst (Control Flow
Hardening): Document -fhardcfr-skip-leaf.
* gnat_rm.texi: Regenerate.

gcc/ada/doc/gnat_rm/security_hardening_features.rst
gcc/ada/gnat_rm.texi

index cf8c8a2493d7fe0f874e16549472c80c5ad78f20..e057af2ea127252927ff7f07f5d8db0323f75c39 100644 (file)
@@ -369,6 +369,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.
index 988bb779105218b90b9c74826571d7fc9b211496..0d11be0c188e247ce02a45277e99353b66af9858 100644 (file)
@@ -29515,6 +29515,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
+@code{-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.