public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Walfred Tedeschi <walfred.tedeschi@intel.com>
Cc: palves@redhat.com, brobecker@adacore.com, gdb-patches@sourceware.org
Subject: Re: [PATCH V4 6/6] Intel MPX bound violation handling.
Date: Thu, 21 Jan 2016 16:23:00 -0000	[thread overview]
Message-ID: <83vb6m9a0u.fsf@gnu.org> (raw)
In-Reply-To: <1453387705-6597-7-git-send-email-walfred.tedeschi@intel.com>	(message from Walfred Tedeschi on Thu, 21 Jan 2016 15:48:25 +0100)

> From: Walfred Tedeschi <walfred.tedeschi@intel.com>
> Cc: gdb-patches@sourceware.org, Walfred Tedeschi <walfred.tedeschi@intel.com>
> Date: Thu, 21 Jan 2016 15:48:25 +0100
> 
> --- a/gdb/NEWS
> +++ b/gdb/NEWS
> @@ -3,6 +3,21 @@
>  
>  *** Changes since GDB 7.10
>  
> +* Intel MPX boud violation handler.
> +
> +   A boundary violations is presented to the inferior as
> +   a segmentation fault having SIGCODE 3. In this case
                                           ^^
Two spaces between sentences, please.

> +   GDB  displays also the kind of violation (upper or lower), 
> +   bounds, poiter value and the memory accessed, besides displaying
              ^^^^^^
"pointer"

> +   the usual signal received and code location report.
> +
> +   As exemplified below:
> +   Program received signal SIGSEGV, Segmentation fault
> +   upper bound violation - bounds {lbound = 0x603010, ubound = 0x603023}
> +   accessing 0x60302f.
> +   0x0000000000400d7c in upper (p=0x603010, a=0x603030, b=0x603050,
> +   c=0x603070, d=0x603090, len=7) at i386-mpx-sigsegv.c:68

May I suggest to say

  accessing address 0x60302f.

instead?  That would be more clear, I think.

> --- a/gdb/doc/gdb.texinfo
> +++ b/gdb/doc/gdb.texinfo
> @@ -22267,6 +22267,57 @@ whose bounds are to be changed, @var{lbound} and @var{ubound} are new values
>  for lower and upper bounds respectively.
>  @end table
>  
> +
> +A boundary violation is presented to the inferior as
> +a segmentation fault having SIGCODE 3. @value{GDBN} may display additional
                                        ^^
Two spaces.

> +information is displayed in this case.

"...may display additional information is displayed..."?  One of the
"display" and "displayed" is redundant here, I think.

> +                                          On @code{STOP} mode
> +@value{GDBN} will also display the kind of violation: "upper" or
> +"lower", bounds, pointer value and the address accessed.
> +On @code{NOSTOP} no additional information will be presented.

I suggest to say "In STOP mode" and "In NOSTOP mode".  "In", not "On".

> +The usual output of a segfault is:
> +@smallexample
> +Program received signal SIGSEGV, Segmentation fault
> +0x0000000000400d7c in upper (p=0x603010, a=0x603030, b=0x603050,
> +c=0x603070, d=0x603090, len=7) at i386-mpx-sigsegv.c:68
> +68        value = *(p + len);
> +@end smallexample
> +
> +In case it is a bound violation it will be presented as:
> +@smallexample
> +Program received signal SIGSEGV, Segmentation fault
> +upper bound violation - bounds @{lbound = 0x603010, ubound = 0x603023@}
> +accessing 0x60302f.
> +0x0000000000400d7c in upper (p=0x603010, a=0x603030, b=0x603050,
> +c=0x603070, d=0x603090, len=7) at i386-mpx-sigsegv.c:68
> +68        value = *(p + len);
> +@end smallexample

Why do we need to show here the output when no bound violation
happened?

Actually, why not move this description and the example to the
"Signals" node?  If I were a user who received such a notification,
the "Signals" node is where I would look for the explanations first.

Thanks.

  reply	other threads:[~2016-01-21 16:23 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-21 14:48 [PATCH V4 0/6] Intel MPX bound violation support Walfred Tedeschi
2016-01-21 14:48 ` [PATCH V4 3/6] Use linux_get_siginfo_type_with_fields for x86 Walfred Tedeschi
2016-01-21 14:49 ` [PATCH V4 4/6] Add bound related fields to the siginfo structure Walfred Tedeschi
2016-01-21 14:49 ` [PATCH V4 2/6] Prepararion for new siginfo on Linux Walfred Tedeschi
2016-01-21 15:05   ` Pedro Alves
2016-01-21 14:49 ` [PATCH V4 6/6] Intel MPX bound violation handling Walfred Tedeschi
2016-01-21 16:23   ` Eli Zaretskii [this message]
     [not found]     ` <AC542571535E904D8E8ADAE745D60B194452CD61@IRSMSX104.ger.corp.intel.com>
2016-01-21 17:34       ` FW: " Walfred Tedeschi
2016-01-21 17:51         ` Eli Zaretskii
2016-01-21 18:06           ` Pedro Alves
2016-01-21 18:22             ` Eli Zaretskii
2016-01-22  8:38             ` Walfred Tedeschi
2016-01-21 14:49 ` [PATCH V4 5/6] Adaptation of siginfo fixup for the new bnd fields Walfred Tedeschi
2016-01-21 14:49 ` [PATCH V4 1/6] Merge gdb and gdbserver implementations for siginfo Walfred Tedeschi
2016-01-21 15:05   ` Pedro Alves

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=83vb6m9a0u.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.com \
    --cc=walfred.tedeschi@intel.com \
    /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).