From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 111018 invoked by alias); 5 Nov 2015 10:04:19 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 110216 invoked by uid 89); 5 Nov 2015 10:04:18 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mga02.intel.com Received: from mga02.intel.com (HELO mga02.intel.com) (134.134.136.20) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 05 Nov 2015 10:04:16 +0000 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga101.jf.intel.com with ESMTP; 05 Nov 2015 02:04:06 -0800 X-ExtLoop1: 1 Received: from irsmsx108.ger.corp.intel.com ([163.33.3.3]) by fmsmga002.fm.intel.com with ESMTP; 05 Nov 2015 02:04:05 -0800 Received: from irsmsx104.ger.corp.intel.com ([169.254.5.150]) by IRSMSX108.ger.corp.intel.com ([169.254.11.138]) with mapi id 14.03.0248.002; Thu, 5 Nov 2015 10:04:04 +0000 From: "Tedeschi, Walfred" To: Joel Brobecker CC: "palves@redhat.com" , "gdb-patches@sourceware.org" Subject: RE: [PATCH v1] Intel(R) MPX - Bound violation handling. Date: Thu, 05 Nov 2015 10:04:00 -0000 Message-ID: References: <1445864086-4831-1-git-send-email-walfred.tedeschi@intel.com> <1445864086-4831-4-git-send-email-walfred.tedeschi@intel.com> <20151104145458.GK4009@adacore.com> In-Reply-To: <20151104145458.GK4009@adacore.com> Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2015-11/txt/msg00175.txt.bz2 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 ju= nk memory. On the other hand those fields have meaning when the sig_code is 3, and me= aningless otherwise. Also see that reading the glibc version will not help a lot. Architecture a= nd availability of fields might vary. Possible solution is to zero the fields if value of sig_code is different t= han 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 >=20 > * 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. >=20 > 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 naggi= ng 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