strace: Upgrade to 5.2

License-Updtate: Copyright years changed
4b4a0e5a6e (diff-7116ef0705885343c9e1b2171a06be0e)

Drop backport patch for mips o32 build fix
Refresh patches to apply on 5.2

(From OE-Core rev: abeb32772b8b3a144e468e5a27b1a31f646317e4)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Khem Raj
2019-07-23 19:43:45 -07:00
committed by Richard Purdie
parent ae4ceea4fe
commit 3ab89fa06f
4 changed files with 10 additions and 114 deletions

View File

@@ -13,22 +13,19 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
ptrace.h | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/ptrace.h b/ptrace.h
index 89d4b95..b3f45bb 100644
--- a/ptrace.h
+++ b/ptrace.h
@@ -30,7 +30,13 @@
# define ptrace_peeksiginfo_args XXX_ptrace_peeksiginfo_args
#endif
# define ptrace_peeksiginfo_args XXX_ptrace_peeksiginfo_args
# endif
-#include <linux/ptrace.h>
+#if defined(POWERPC) && !defined(__GLIBC__)
+#define pt_regs uapi_pt_regs
+#endif
+# include <linux/ptrace.h>
# include <linux/ptrace.h>
+#if defined(POWERPC) && !defined(__GLIBC__)
+# undef pt_regs
+#endif
#ifdef HAVE_STRUCT_IA64_FPREG
# undef ia64_fpreg
# ifdef HAVE_STRUCT_IA64_FPREG
# undef ia64_fpreg

View File

@@ -1,98 +0,0 @@
From 2c8b6de913973274e877639658e9e7273a012adb Mon Sep 17 00:00:00 2001
From: "Dmitry V. Levin" <ldv@altlinux.org>
Date: Tue, 8 Jan 2019 19:23:44 +0000
Subject: [PATCH] mips o32: fix build
Upstream-Status: Backport
Commit 917c2ccf3a67 "Refactor stack pointers" moved mips_REG_* macros
from linux/mips/arch_regs.h to linux/mips/arch_regs.c because these
macros are no longer used outside syscall.c or files included by
syscall.c, but this caused a build regression on mips o32 because
decode_syscall_subcall() uses mips_REG_SP prior to its definition.
* syscall.c (decode_syscall_subcall): Move ...
* linux/mips/get_syscall_args.c: ... here.
Reported-by: Baruch Siach <baruch@tkos.co.il>
Fixes: v4.26~61 "Refactor stack pointers"
---
linux/mips/get_syscall_args.c | 26 ++++++++++++++++++++++++++
syscall.c | 27 ++-------------------------
2 files changed, 29 insertions(+), 25 deletions(-)
diff --git a/linux/mips/get_syscall_args.c b/linux/mips/get_syscall_args.c
index 387aa852..e2889f98 100644
--- a/linux/mips/get_syscall_args.c
+++ b/linux/mips/get_syscall_args.c
@@ -37,3 +37,29 @@ arch_get_syscall_args(struct tcb *tcp)
#endif
return 1;
}
+
+#ifdef SYS_syscall_subcall
+static void
+decode_syscall_subcall(struct tcb *tcp)
+{
+ if (!scno_is_valid(tcp->u_arg[0]))
+ return;
+ tcp->scno = tcp->u_arg[0];
+ tcp->qual_flg = qual_flags(tcp->scno);
+ tcp->s_ent = &sysent[tcp->scno];
+ memmove(&tcp->u_arg[0], &tcp->u_arg[1],
+ sizeof(tcp->u_arg) - sizeof(tcp->u_arg[0]));
+ /*
+ * Fetching the last arg of 7-arg syscalls (fadvise64_64
+ * and sync_file_range) requires additional code,
+ * see linux/mips/get_syscall_args.c
+ */
+ if (tcp->s_ent->nargs == MAX_ARGS) {
+ if (umoven(tcp,
+ mips_REG_SP + MAX_ARGS * sizeof(tcp->u_arg[0]),
+ sizeof(tcp->u_arg[0]),
+ &tcp->u_arg[MAX_ARGS - 1]) < 0)
+ tcp->u_arg[MAX_ARGS - 1] = 0;
+ }
+}
+#endif /* SYS_syscall_subcall */
diff --git a/syscall.c b/syscall.c
index d78f51dd..51fcc721 100644
--- a/syscall.c
+++ b/syscall.c
@@ -349,31 +349,8 @@ decode_ipc_subcall(struct tcb *tcp)
#endif /* SYS_ipc_subcall */
#ifdef SYS_syscall_subcall
-static void
-decode_syscall_subcall(struct tcb *tcp)
-{
- if (!scno_is_valid(tcp->u_arg[0]))
- return;
- tcp->scno = tcp->u_arg[0];
- tcp->qual_flg = qual_flags(tcp->scno);
- tcp->s_ent = &sysent[tcp->scno];
- memmove(&tcp->u_arg[0], &tcp->u_arg[1],
- sizeof(tcp->u_arg) - sizeof(tcp->u_arg[0]));
-# ifdef LINUX_MIPSO32
- /*
- * Fetching the last arg of 7-arg syscalls (fadvise64_64
- * and sync_file_range) requires additional code,
- * see linux/mips/get_syscall_args.c
- */
- if (tcp->s_ent->nargs == MAX_ARGS) {
- if (umoven(tcp,
- mips_REG_SP + MAX_ARGS * sizeof(tcp->u_arg[0]),
- sizeof(tcp->u_arg[0]),
- &tcp->u_arg[MAX_ARGS - 1]) < 0)
- tcp->u_arg[MAX_ARGS - 1] = 0;
- }
-# endif /* LINUX_MIPSO32 */
-}
+/* The implementation is architecture specific. */
+static void decode_syscall_subcall(struct tcb *);
#endif /* SYS_syscall_subcall */
static void
--
2.17.0

View File

@@ -19,16 +19,14 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
tests/sigaction.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/sigaction.c b/tests/sigaction.c
index 95be197..54819f9 100644
--- a/tests/sigaction.c
+++ b/tests/sigaction.c
@@ -156,7 +156,7 @@ main(void)
sigdelset(mask.libc, SIGHUP);
memcpy(new_act->mask, mask.old, sizeof(mask.old));
-#ifdef SA_RESTORER
-# ifdef SA_RESTORER
+#if defined(SA_RESTORER) && !defined(MIPS) && !defined(ALPHA)
new_act->flags = SA_RESTORER;
new_act->restorer = (unsigned long) 0xdeadfacecafef00dULL;
# define SA_RESTORER_FMT ", sa_flags=SA_RESTORER, sa_restorer=%#lx"
# define SA_RESTORER_FMT ", sa_flags=SA_RESTORER, sa_restorer=%#lx"

View File

@@ -2,7 +2,7 @@ SUMMARY = "System call tracing tool"
HOMEPAGE = "http://strace.io"
SECTION = "console/utils"
LICENSE = "LGPL-2.1+ & GPL-2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=5c84d1c6e48e7961ccd2cd2ae32f7bf1"
LIC_FILES_CHKSUM = "file://COPYING;md5=0169a04810830e94f4b1cfb823c9f592"
SRC_URI = "https://strace.io/files/${PV}/strace-${PV}.tar.xz \
file://disable-git-version-gen.patch \
@@ -14,11 +14,10 @@ SRC_URI = "https://strace.io/files/${PV}/strace-${PV}.tar.xz \
file://mips-SIGEMT.patch \
file://0001-caps-abbrev.awk-fix-gawk-s-path.patch \
file://0001-tests-sigaction-Check-for-mips-and-alpha-before-usin.patch \
file://0001-mips-o32-fix-build.patch \
file://ptest-spacesave.patch \
"
SRC_URI[md5sum] = "daa51acc0c7c696221ec03cf0b30a7af"
SRC_URI[sha256sum] = "7c4d2ffeef4f7d1cdc71062ca78d1130eb52f947c2fca82f59f6a1183bfa1e1c"
SRC_URI[md5sum] = "b9c02b07dcde5125498ce7da69b77baf"
SRC_URI[sha256sum] = "d513bc085609a9afd64faf2ce71deb95b96faf46cd7bc86048bc655e4e4c24d2"
inherit autotools ptest