From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2140) id 0BE6E3858414; Fri, 23 Jun 2023 20:13:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0BE6E3858414 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1687551192; bh=ni1yqwmKL/tyOgRfDKi9PMYWai3QjXNJ5XJSs3Ord7c=; h=From:To:Subject:Date:From; b=rjnbX48SOysrGtP0VZ+9wg7Ba4kdi27tuNmzbGiHeTAvn6vH4Bw9oqh7Ix8/kkVgr IAMJQVrBYt8nsD0ThO1odcxTUtVYe8BGJHswqyJ0rTE5xZQRBQF/nLuoLs/1I6DkRQ vrvKfxWCRyAHskRiDeoW90SyxOAil9M6zWcT+Riw= 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: df9c89700f234305be581cc6613c95c442f4547a X-Git-Newrev: 191500d941c4048953c534f61e2e937359591fc7 Message-Id: <20230623201312.0BE6E3858414@sourceware.org> Date: Fri, 23 Jun 2023 20:13:12 +0000 (GMT) List-Id: https://gcc.gnu.org/g:191500d941c4048953c534f61e2e937359591fc7 commit 191500d941c4048953c534f61e2e937359591fc7 Author: Alexandre Oliva 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.