arm64: ptrace: Fix overwriting 1st argument with return value

Since arm64 shares the return value with the area of
the first argument, rewriting the return value before
the system call execution completes destroys the first argument.

Change-Id: I959944879254d8dd3a29489a65d8f274d45338e6
Fujitsu: POSTK_DEBUG_ARCH_DEP_110
This commit is contained in:
Shiratori, Takehiro
2019-03-05 12:22:18 +09:00
committed by Masamichi Takagi
parent ac18a24a27
commit ea7f517e3d
4 changed files with 35 additions and 8 deletions

View File

@ -2735,4 +2735,12 @@ void calculate_time_from_tsc(struct timespec *ts)
++ts->tv_sec;
}
}
extern void ptrace_syscall_event(struct thread *thread);
long arch_ptrace_syscall_event(struct thread *thread,
ihk_mc_user_context_t *ctx, long setret)
{
ptrace_syscall_event(thread);
return setret;
}
/*** End of File ***/