public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Pierre-Marie de Rodat <pmderodat@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r13-1665] [Ada] Clarify hardening command-line options that require explicit choices
Date: Wed, 13 Jul 2022 10:03:32 +0000 (GMT)	[thread overview]
Message-ID: <20220713100332.0E9FA385041E@sourceware.org> (raw)

https://gcc.gnu.org/g:4621bae835be11ae4ec81d5842166e819826459c

commit r13-1665-g4621bae835be11ae4ec81d5842166e819826459c
Author: Alexandre Oliva <oliva@adacore.com>
Date:   Thu Jul 7 08:55:24 2022 -0300

    [Ada] Clarify hardening command-line options that require explicit choices
    
    Prefixes -fzero-call-used-regs and -fstrub could be mistaken for full
    command-line options with the references to them in the GNAT RM.  Make
    it clearer that they require explicit choices.
    
    gcc/ada/
    
            * doc/gnat_rm/security_hardening_features.rst: Clarify the need
            for choices after -fzero-call-used-regs and -fstrub.
            * gnat_rm.texi: Regenerate.

Diff:
---
 gcc/ada/doc/gnat_rm/security_hardening_features.rst | 17 +++++++++--------
 gcc/ada/gnat_rm.texi                                | 17 +++++++++--------
 2 files changed, 18 insertions(+), 16 deletions(-)

diff --git a/gcc/ada/doc/gnat_rm/security_hardening_features.rst b/gcc/ada/doc/gnat_rm/security_hardening_features.rst
index f4f752d53c7..f5fdc8e46b4 100644
--- a/gcc/ada/doc/gnat_rm/security_hardening_features.rst
+++ b/gcc/ada/doc/gnat_rm/security_hardening_features.rst
@@ -18,9 +18,10 @@ Register Scrubbing
 GNAT can generate code to zero-out hardware registers before returning
 from a subprogram.
 
-It can be enabled with the :switch:`-fzero-call-used-regs` command-line
-option, to affect all subprograms in a compilation, and with a
-:samp:`Machine_Attribute` pragma, to affect only specific subprograms.
+It can be enabled with the :switch:`-fzero-call-used-regs={choice}`
+command-line option, to affect all subprograms in a compilation, and
+with a :samp:`Machine_Attribute` pragma, to affect only specific
+subprograms.
 
 .. code-block:: ada
 
@@ -73,11 +74,11 @@ or a variable.)
      --  scrubbing of the stack space used by that subprogram.
 
 
-There are also :switch:`-fstrub` command-line options to control
-default settings.  For usage and more details on the command-line
-option, on the ``strub`` attribute, and their use with other
-programming languages, see :title:`Using the GNU Compiler Collection
-(GCC)`.
+There are also :switch:`-fstrub={choice}` command-line options to
+control default settings.  For usage and more details on the
+command-line options, on the ``strub`` attribute, and their use with
+other programming languages, see :title:`Using the GNU Compiler
+Collection (GCC)`.
 
 Note that Ada secondary stacks are not scrubbed.  The restriction
 ``No_Secondary_Stack`` avoids their use, and thus their accidental
diff --git a/gcc/ada/gnat_rm.texi b/gcc/ada/gnat_rm.texi
index b264a45a4ca..1ffc1464c4f 100644
--- a/gcc/ada/gnat_rm.texi
+++ b/gcc/ada/gnat_rm.texi
@@ -21,7 +21,7 @@
 
 @copying
 @quotation
-GNAT Reference Manual , Jun 24, 2022
+GNAT Reference Manual , Jul 11, 2022
 
 AdaCore
 
@@ -28922,9 +28922,10 @@ change.
 GNAT can generate code to zero-out hardware registers before returning
 from a subprogram.
 
-It can be enabled with the @code{-fzero-call-used-regs} command-line
-option, to affect all subprograms in a compilation, and with a
-@code{Machine_Attribute} pragma, to affect only specific subprograms.
+It can be enabled with the @code{-fzero-call-used-regs=@emph{choice}}
+command-line option, to affect all subprograms in a compilation, and
+with a @code{Machine_Attribute} pragma, to affect only specific
+subprograms.
 
 @example
 procedure Foo;
@@ -28975,10 +28976,10 @@ pragma Machine_Attribute (Var, "strub");
 --  scrubbing of the stack space used by that subprogram.
 @end example
 
-There are also @code{-fstrub} command-line options to control
-default settings.  For usage and more details on the command-line
-option, on the @code{strub} attribute, and their use with other
-programming languages, see @cite{Using the GNU Compiler Collection (GCC)}.
+There are also @code{-fstrub=@emph{choice}} command-line options to
+control default settings.  For usage and more details on the
+command-line options, on the @code{strub} attribute, and their use with
+other programming languages, see @cite{Using the GNU Compiler Collection (GCC)}.
 
 Note that Ada secondary stacks are not scrubbed.  The restriction
 @code{No_Secondary_Stack} avoids their use, and thus their accidental


                 reply	other threads:[~2022-07-13 10:03 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220713100332.0E9FA385041E@sourceware.org \
    --to=pmderodat@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).