Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Sun, 26 Mar 2017 14:50:37 -0500
From: Bobby Bingham <koorogi@...rogi.info>
To: musl@...ts.openwall.com
Subject: [PATCH] s390x: provide sigcontext struct definition

This structure was missed when creating the s390x port.

This is based on the report and patch from William Pitcock, but with a
modified structure defintion to more closely match the kernel's
definition.
---

The kernel headers do not use mcontext_t, but rather another structure
with the same memory layout.  It's broken into a different set of
sub-structures, and some members have different names.

 arch/s390x/bits/signal.h | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/arch/s390x/bits/signal.h b/arch/s390x/bits/signal.h
index c8665832..e5aca4ba 100644
--- a/arch/s390x/bits/signal.h
+++ b/arch/s390x/bits/signal.h
@@ -33,6 +33,21 @@ typedef struct
 	fpregset_t fpregs;
 } mcontext_t;
 
+struct sigcontext {
+	unsigned long oldmask[1];
+	struct {
+		struct {
+			__psw_t psw;
+			unsigned long gprs[16];
+			unsigned acrs[16];
+		} regs;
+		struct {
+			unsigned fpc;
+			double fprs[16];
+		} fpregs;
+	} *sregs;
+};
+
 #else
 
 typedef struct {
-- 
2.12.1

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.