Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Tedeschi, Walfred" <walfred.tedeschi@intel.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: "palves@redhat.com" <palves@redhat.com>,
	"gdb-patches@sourceware.org"	<gdb-patches@sourceware.org>
Subject: RE: [PATCH v1] Intel(R) MPX - Bound violation handling.
Date: Thu, 05 Nov 2015 10:04:00 -0000	[thread overview]
Message-ID: <AC542571535E904D8E8ADAE745D60B19444DFFE2@IRSMSX104.ger.corp.intel.com> (raw)
In-Reply-To: <20151104145458.GK4009@adacore.com>

Hello Joel,

Thanks a lot for your support and feedback! :)

The new fields are on the bottom of the structure and yes we are reading junk memory.
On the other hand those fields have meaning when the  sig_code is 3, and meaningless otherwise.

Also see that reading the glibc version will not help a lot. Architecture and availability of fields might vary.

Possible solution is to zero the fields if value of sig_code is different than 3.

Or let the interpretation for the user, what is also an option the siginfo is already a set of unions. They have to be interpreted by the user anyhow.

Thanks and regards,
-Fred

-----Original Message-----
From: gdb-patches-owner@sourceware.org [mailto:gdb-patches-owner@sourceware.org] On Behalf Of Joel Brobecker
Sent: Wednesday, November 04, 2015 3:55 PM
To: Tedeschi, Walfred
Cc: palves@redhat.com; gdb-patches@sourceware.org
Subject: Re: [PATCH v1] Intel(R) MPX - Bound violation handling.

> 2015-07-21  Walfred Tedeschi  <walfred.tedeschi@intel.com>
> 
> 	* amd64-linux-tdep.c (amd64_linux_init_abi_common):
> 	Add handler for bound violation signal.
> 	* gdbarch.sh (bound_violation_handler): New.
> 	* i386-linux-tdep.c (i386_mpx_bound_violation_handler): New.
> 	(i386_linux_init_abi): Use i386_mpx_bound_violation_handler.
> 	* i386-linux-tdep.h (i386_mpx_bound_violation_handler) New.
> 	* i386-tdep.c (i386_mpx_enabled): Add as external.
> 	* i386-tdep.c (i386_mpx_enabled): Add as external.
> 	* infrun.c (process_segmentation_faults): New.
> 	(print_signal_received_reason): Use process_segmentation_faults.
> 
> testsuite/gdb.arch
> 	* i386-mpx-sigsegv.c: New.
> 	* i386-mpx-sigsegv.exp: New.
> 	* i386-mpx-simple_segv.c: New.
> 	* i386-mpx-simple_segv.exp: New.

This is not a full review (haven't had the time), but one question is nagging at me: How to do handle the case of older kernels/libc-s, where the info is not there? Does it look like you are just reading undefined memory?

--
Joel
Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid, Christian Lamprechter
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928


  reply	other threads:[~2015-11-05 10:04 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-26 15:09 [PATCH obv] Changing compiler flags for MPX tests Walfred Tedeschi
2015-10-26 16:10 ` [PATCH v1] Intel(R) MPX registers to the DWARF enumeration Walfred Tedeschi
2015-12-06 16:35   ` Joel Brobecker
2015-12-06 17:42     ` H.J. Lu
2015-12-07  8:29       ` Tedeschi, Walfred
2015-10-26 16:11 ` [PATCH v1] Synchronize siginfo type described in GDB with the kernel and glibc ones Walfred Tedeschi
2015-11-18 23:01   ` Joel Brobecker
2015-11-19  9:52     ` Tedeschi, Walfred
2015-11-19 13:27       ` Pedro Alves
2015-11-19 16:41         ` Tedeschi, Walfred
2015-11-19 17:07           ` Pedro Alves
2015-12-01 10:08             ` Tedeschi, Walfred
2015-12-01 12:08               ` Pedro Alves
2015-10-26 16:22 ` [PATCH v1] ABI changes for Intel(R) MPX Walfred Tedeschi
2015-10-26 19:07   ` Eli Zaretskii
2015-10-27 17:21     ` Tedeschi, Walfred
2015-12-06 16:16   ` Joel Brobecker
2015-10-26 16:25 ` [PATCH obv] Fix non stopping breakpoint on newer compilers Walfred Tedeschi
2015-11-04 14:42   ` Joel Brobecker
2015-10-26 16:26 ` [PATCH v1] Intel(R) MPX - Bound violation handling Walfred Tedeschi
2015-11-04 14:55   ` Joel Brobecker
2015-11-05 10:04     ` Tedeschi, Walfred [this message]
2015-11-19  0:01   ` Joel Brobecker
2015-12-14 17:43     ` Tedeschi, Walfred
2015-12-14 18:45       ` Pedro Alves
2015-12-15 11:01         ` Tedeschi, Walfred
2015-12-16 15:21           ` Tedeschi, Walfred
2015-12-16 16:52             ` Pedro Alves
2015-12-17 17:31               ` Tedeschi, Walfred
2015-12-21 17:23           ` Pedro Alves
2015-11-04 14:42 ` [PATCH obv] Changing compiler flags for MPX tests Joel Brobecker

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=AC542571535E904D8E8ADAE745D60B19444DFFE2@IRSMSX104.ger.corp.intel.com \
    --to=walfred.tedeschi@intel.com \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.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