From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2140) id AD91B385700F; Thu, 8 Jun 2023 09:17:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AD91B385700F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1686215861; bh=b/WyssE1196CMYtdw11wCmoiyTFstZsNrDXr2tnAbdU=; h=From:To:Subject:Date:From; b=d3/sAs8sCs62phT78Ks9LidX+88JAo/WB3e1tbqvr5/VcWc534KIyOnJfq4aMZjml Z0sQX3f9SaA24pqKeSSStScjGxBB+xECrMjCZwwVI2H4cZ9ytu1zgPQeR9iwVCY0Wq NzVHBW2B+4+MIEOuh8QJuR5ZCpixoTA/PAXNKOEc= 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: 3334b477965df23c819f92118bdfd157d2832fbb X-Git-Newrev: c4d4a9fe2bf270ca93c0b545997226cb9b153d6c Message-Id: <20230608091741.AD91B385700F@sourceware.org> Date: Thu, 8 Jun 2023 09:17:41 +0000 (GMT) List-Id: https://gcc.gnu.org/g:c4d4a9fe2bf270ca93c0b545997226cb9b153d6c commit c4d4a9fe2bf270ca93c0b545997226cb9b153d6c Author: Alexandre Oliva Date: Thu Oct 20 20:27:14 2022 -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.