Remove hacks for old kernels for architectures which require new kernels

* 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>
This commit is contained in:
Denys Vlasenko 2013-02-12 13:06:51 +01:00
parent d27809c978
commit bf357fcb76
2 changed files with 10 additions and 2 deletions

2
defs.h
View File

@ -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.)

10
util.c
View File

@ -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 */