Mail archive
alpine-aports

[alpine-aports] [PATCH] main/strace: fix temp bug in s390x

From: Tuan M. Hoang <tmhoang_at_flatglobe.org>
Date: Sun, 9 Apr 2017 02:34:31 -0400

---
 main/strace/APKBUILD                     |  6 ++++--
 main/strace/s390x-signal-framesize.patch | 17 +++++++++++++++++
 2 files changed, 21 insertions(+), 2 deletions(-)
 create mode 100644 main/strace/s390x-signal-framesize.patch
diff --git a/main/strace/APKBUILD b/main/strace/APKBUILD
index 0a7a7f0d..d5a66ad4 100644
--- a/main/strace/APKBUILD
+++ b/main/strace/APKBUILD
_at_@ -10,7 +10,8 @@ depends=
 makedepends="linux-headers"
 subpackages="$pkgname-doc"
 source="http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.xz
-	fix-ppc-pt-regs-collision.patch"
+	fix-ppc-pt-regs-collision.patch
+	s390x-signal-framesize.patch"
 
 builddir="$srcdir/$pkgname-$pkgver"
 prepare() {
_at_@ -43,4 +44,5 @@ package() {
 }
 
 sha512sums="d1a7b782cb8196eb95b431b66f9b0eff7886869a7e3a4618d985f73b2eed7590ba73150b9c33e55ee5c65fc8f863588b64c5611dca7b5d7a4183110eaf4451d5  strace-4.16.tar.xz
-b70cee89dd49a2b5a69dc2a56c3a11169d3306e1a73981155188b574486965c034aa52b4ac1c6edff5ef55c9d52f27750acb242fac095a8a9f69689b51b3fad1  fix-ppc-pt-regs-collision.patch"
+b70cee89dd49a2b5a69dc2a56c3a11169d3306e1a73981155188b574486965c034aa52b4ac1c6edff5ef55c9d52f27750acb242fac095a8a9f69689b51b3fad1  fix-ppc-pt-regs-collision.patch
+37bd35111f902b3785ee006b3e6e3a7b064125c411277c659c5f4e8e7b3c9b4249feaf4616cacff368616beed3414778f0e0e3592a524d890917681004885d6b  s390x-signal-framesize.patch"
diff --git a/main/strace/s390x-signal-framesize.patch b/main/strace/s390x-signal-framesize.patch
new file mode 100644
index 00000000..48a15d61
--- /dev/null
+++ b/main/strace/s390x-signal-framesize.patch
_at_@ -0,0 +1,17 @@
+__SIGNAL_FRAMESIZE is defined in asm/sigcontext.h but including it would make
+conflict with struct sigcontext since we compile with it in musl. This patch
+is temporary till musl upstream has a proper solution for sigcontext.
+
+diff --git a/linux/s390/arch_sigreturn.c b/linux/s390/arch_sigreturn.c
+index d1b8598..c0a4658 100644
+--- a/linux/s390/arch_sigreturn.c
++++ b/linux/s390/arch_sigreturn.c
+_at_@ -2,7 +2,7 @@ static void
+ arch_sigreturn(struct tcb *tcp)
+ {
+ 	unsigned long mask[NSIG_BYTES / sizeof(long)];
+-	const unsigned long addr = *s390_frame_ptr + __SIGNAL_FRAMESIZE;
++	const unsigned long addr = *s390_frame_ptr + 160;
+ 
+ 	if (umove(tcp, addr, &mask) < 0) {
+ 		tprintf("{mask=%#lx}", addr);
-- 
2.12.2
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Sun Apr 09 2017 - 02:34:31 UTC