Re: FW: [PATCH V4 6/6] Intel MPX bound violation handling.

Eli Zaretskii
2016-01-21T17:51:01Z

> Date: Thu, 21 Jan 2016 18:34:12 +0100
> From: Walfred Tedeschi <walfred.tedeschi@intel.com>
>
> >> +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.
> I will move it there. About the example I wanted to show where the
> change will be placed. If you consider that this is superfluous, no
> issue in removing.

If you move the description there, showing both examples would be
good. In the place where you put it, only the bounds violation is
described, so it is strange to have there the display without bounds
violation.

> Will the snippet bellow be better?
>
> Program received signal SIGSEGV, Segmentation fault upper bound
> violation - bounds @{lbound = 0x603010, ubound = 0x603023@} accessing
> 0x60302f.

I still think the word "address" should be added after "accessing".

But if no one else thinks it's important, I don't insist.

Thanks.