]> granicus.if.org Git - strace/commitdiff
Remove hacks for old kernels for architectures which require new kernels
authorDenys Vlasenko <vda.linux@googlemail.com>
Tue, 12 Feb 2013 12:06:51 +0000 (13:06 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Tue, 12 Feb 2013 12:06:51 +0000 (13:06 +0100)
* defs.h: Do not define TCB_WAITEXECVE for AARCH64.
* util.c (change_syscall): For AARCH64 and X32, replace code
with dummy "return 0" and a comment explaining why that is ok
for these architectures.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
defs.h
util.c

diff --git a/defs.h b/defs.h
index 50620b3f501e3db14a573255aa48f039bf7f6cb9..068ee3dc33a02f02779ea45322dd25315d1463db 100644 (file)
--- a/defs.h
+++ b/defs.h
@@ -442,7 +442,7 @@ struct tcb {
  || defined(HPPA) \
  || defined(SH) || defined(SH64) \
  || defined(S390) || defined(S390X) \
- || defined(ARM) || defined(AARCH64) \
+ || defined(ARM) \
  || defined(MIPS)
 /* This tracee has entered into execve syscall. Expect post-execve SIGTRAP
  * to happen. (When it is detected, tracee is continued and this bit is cleared.)
diff --git a/util.c b/util.c
index ae90c348c3f8973f7c661998d45e5a67e0933727..fa5960419803c6f81870be25a267255a01597515 100644 (file)
--- a/util.c
+++ b/util.c
@@ -1198,10 +1198,14 @@ change_syscall(struct tcb *tcp, arg_setup_state *state, int new)
        if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(ORIG_EAX * 4), new) < 0)
                return -1;
        return 0;
-#elif defined(X86_64) || defined(X32)
+#elif defined(X86_64)
        if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(ORIG_RAX * 8), new) < 0)
                return -1;
        return 0;
+#elif defined(X32)
+       /* setbpt/clearbpt never used: */
+       /* X32 is only supported since about linux-3.0.30 */
+       return 0;
 #elif defined(POWERPC)
        if (ptrace(PTRACE_POKEUSER, tcp->pid,
                   (char*)(sizeof(unsigned long)*PT_R0), new) < 0)
@@ -1280,6 +1284,10 @@ change_syscall(struct tcb *tcp, arg_setup_state *state, int new)
        if (ptrace(PTRACE_SET_SYSCALL, tcp->pid, 0, new & 0xffff) != 0)
                return -1;
        return 0;
+#elif defined(AARCH64)
+       /* setbpt/clearbpt never used: */
+       /* AARCH64 is only supported since about linux-3.0.31 */
+       return 0;
 #elif defined(TILE)
        /* setbpt/clearbpt never used: */
        /* Tilera CPUs are only supported since about linux-2.6.34 */