From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/10059 Path: news.gmane.org!not-for-mail From: Szabolcs Nagy Newsgroups: gmane.linux.lib.musl.general Subject: [PATCH 4/7] update siginfo struct for linux v4.6 Date: Thu, 26 May 2016 22:06:10 +0200 Message-ID: References: Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1464293191 6698 80.91.229.3 (26 May 2016 20:06:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 26 May 2016 20:06:31 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-10072-gllmg-musl=m.gmane.org@lists.openwall.com Thu May 26 22:06:31 2016 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1b61Y3-0006fa-TN for gllmg-musl@m.gmane.org; Thu, 26 May 2016 22:06:28 +0200 Original-Received: (qmail 16157 invoked by uid 550); 26 May 2016 20:06:25 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 16107 invoked from network); 26 May 2016 20:06:22 -0000 Mail-Followup-To: musl@lists.openwall.com Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Xref: news.gmane.org gmane.linux.lib.musl.general:10059 Archived-At: x86 protection key faults are reported in the si_pkey field, added in linux commit cd0ea35ff5511cde299a61c21a95889b4a71464e --- include/signal.h | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/include/signal.h b/include/signal.h index c6323c6..a16094c 100644 --- a/include/signal.h +++ b/include/signal.h @@ -74,6 +74,7 @@ typedef struct sigaltstack stack_t; #define SEGV_MAPERR 1 #define SEGV_ACCERR 2 #define SEGV_BNDERR 3 +#define SEGV_PKUERR 4 #define BUS_ADRALN 1 #define BUS_ADRERR 2 @@ -123,10 +124,13 @@ typedef struct { struct { void *si_addr; short si_addr_lsb; - struct { - void *si_lower; - void *si_upper; - } __addr_bnd; + union { + struct { + void *si_lower; + void *si_upper; + } __addr_bnd; + unsigned si_pkey; + } __first; } __sigfault; struct { long si_band; @@ -147,8 +151,9 @@ typedef struct { #define si_value __si_fields.__si_common.__second.si_value #define si_addr __si_fields.__sigfault.si_addr #define si_addr_lsb __si_fields.__sigfault.si_addr_lsb -#define si_lower __si_fields.__sigfault.__addr_bnd.si_lower -#define si_upper __si_fields.__sigfault.__addr_bnd.si_upper +#define si_lower __si_fields.__sigfault.__first.__addr_bnd.si_lower +#define si_upper __si_fields.__sigfault.__first.__addr_bnd.si_upper +#define si_pkey __si_fields.__sigfault.__first.si_pkey #define si_band __si_fields.__sigpoll.si_band #define si_fd __si_fields.__sigpoll.si_fd #define si_timerid __si_fields.__si_common.__first.__timer.si_timerid -- 2.8.1