From patchwork Tue Jul 21 09:36:02 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Walfred Tedeschi X-Patchwork-Id: 7773 Received: (qmail 93538 invoked by alias); 21 Jul 2015 09:36:25 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 93515 invoked by uid 89); 21 Jul 2015 09:36:24 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.6 required=5.0 tests=AWL, BAYES_50, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mga03.intel.com X-ExtLoop1: 1 From: "Tedeschi, Walfred" To: "H.J. Lu" , GNU C Library CC: Dave Hansen Subject: RE: [PATCH] BZ #18696: x86 bits/siginfo.h is out of date Date: Tue, 21 Jul 2015 09:36:02 +0000 Message-ID: References: <20150720173339.GA2439@intel.com> In-Reply-To: <20150720173339.GA2439@intel.com> MIME-Version: 1.0 Thanks HJ, Worked also here! -Fred -----Original Message----- From: Lu, Hongjiu Sent: Monday, July 20, 2015 7:34 PM To: GNU C Library Cc: Tedeschi, Walfred; Dave Hansen Subject: [PATCH] BZ #18696: x86 bits/siginfo.h is out of date X86 struct siginfo in kernel 3.19 has been changed by commit ee1b58d36aa1b5a79eaba11f5c3633c88231da83 Author: Qiaowei Ren Date: Fri Nov 14 07:18:19 2014 -0800 mpx: Extend siginfo structure to include bound violation information This patch adds new fields about bound violation into siginfo structure. si_lower and si_upper are respectively lower bound and upper bound when bound violation is caused. This patch updates x86 struct siginfo to enable GDB with MPX support. Fred and Dave, can you test the enclosed patch for /usr/include/bits/siginfo.h on GDB with MPX support? Thanks. H.J. - [BZ #18696] * sysdeps/unix/sysv/linux/x86/bits/siginfo.h (_sigfault): Add si_addr_bnd. (si_lower): New. (si_upper): Likewise. --- sysdeps/unix/sysv/linux/x86/bits/siginfo.h | 7 +++++++ 1 file changed, 7 insertions(+) -- 2.4.3 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, Prof. Dr. Hermann Eul Chairperson of the Supervisory Board: Tiffany Doon Silva Registered Office: Munich Commercial Register: Amtsgericht Muenchen HRB 186928 diff --git a/sysdeps/unix/sysv/linux/x86/bits/siginfo.h b/sysdeps/unix/sysv/linux/x86/bits/siginfo.h index 9431869..3151bf3 100644 --- a/sysdeps/unix/sysv/linux/x86/bits/siginfo.h +++ b/sysdeps/unix/sysv/linux/x86/bits/siginfo.h @@ -108,6 +108,11 @@ typedef struct { void *si_addr; /* Faulting insn/memory ref. */ short int si_addr_lsb; /* Valid LSB of the reported address. */ + struct + { + void *_lower; + void *_upper; + } si_addr_bnd; } _sigfault; /* SIGPOLL. */ @@ -141,6 +146,8 @@ typedef struct # define si_ptr _sifields._rt.si_sigval.sival_ptr # define si_addr _sifields._sigfault.si_addr # define si_addr_lsb _sifields._sigfault.si_addr_lsb +# define si_lower _sifields._sigfault.si_addr_bnd._lower +# define si_upper _sifields._sigfault.si_addr_bnd._upper # define si_band _sifields._sigpoll.si_band # define si_fd _sifields._sigpoll.si_fd # define si_call_addr _sifields._sigsys._call_addr