From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2140) id DF2563856974; Fri, 9 Jun 2023 08:07:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DF2563856974 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1686298038; bh=NrCCWdniyFb1xnUewzDyj75yNWs38AA7yWxybhAm6R8=; h=From:To:Subject:Date:From; b=ga9cAaBXOQ0ofHLgyX3fNkaSvxk8sOKrLGgQ3yUddddnS0zbzQicM4saGHd+4WSgG +VI3oICjg/75WcHDQI5JSHcxHgmx5xEypNmJ1tn7Ll94MB4+G8+Z/foO4djW6jYFy/ JTPuFkoqzfnRhoxYafpKjMAlLQCqnUKAfUxVd0Jk= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Alexandre Oliva To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/users/aoliva/heads/testme)] hardcfr: optionally disable in leaf functions [ada doc] X-Act-Checkin: gcc X-Git-Author: Alexandre Oliva X-Git-Refname: refs/users/aoliva/heads/testme X-Git-Oldrev: a6a700e793d986d673786c67a0bc5f2a51a4c9fc X-Git-Newrev: a7fea6132089e9e2475eded5572fd5a53d9cb5b5 Message-Id: <20230609080718.DF2563856974@sourceware.org> Date: Fri, 9 Jun 2023 08:07:18 +0000 (GMT) List-Id: https://gcc.gnu.org/g:a7fea6132089e9e2475eded5572fd5a53d9cb5b5 commit a7fea6132089e9e2475eded5572fd5a53d9cb5b5 Author: Alexandre Oliva 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.