From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2140) id B94ED3858289; Tue, 25 Oct 2022 02:52:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B94ED3858289 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1666666348; bh=Gp0SuqywgEKfsUyIUrd+cg8qMCMW+ZVEgrJP1v4oCxw=; h=From:To:Subject:Date:From; b=CSR8ADqrr+/iIUc5uGYb/WxsFpeIoENJKw5ynxrhW+uF0y63I6nmPhQvwQ+RLgdI/ GAxi116/DPIpHuDVxqAQMtDBtHRYBVuk+18kWBD2VVp+HSsSPos4pZkGtYNu0VVcWi y+oTacU9Q5Q1T5NZk/aXeRmcbQHwcgXJ1+8LdlN0= 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: c6c1bed45898dcaa8b4676fc1e0a79ee4bde5421 X-Git-Newrev: e0194200cba98f3b8d1519e74ad19b7a753dfa22 Message-Id: <20221025025228.B94ED3858289@sourceware.org> Date: Tue, 25 Oct 2022 02:52:26 +0000 (GMT) List-Id: https://gcc.gnu.org/g:e0194200cba98f3b8d1519e74ad19b7a753dfa22 commit e0194200cba98f3b8d1519e74ad19b7a753dfa22 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 eb116f8f55a..fd55752bf33 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.