[PATCH] fix bad syscall on ARM architecture
Hans-Christian Egtvedt
hans-christian.egtvedt at atmel.com
Mon Feb 23 06:26:27 UTC 2009
On Fri, 20 Feb 2009 23:20:40 +0100
Denys Vlasenko <dvlasenk at redhat.com> wrote:
> On Fri, 2009-02-20 at 13:23 +0100, Hans-Christian Egtvedt wrote:
<snipp>
> --- a/syscall.c
> +++ b/syscall.c
> @@ -1060,6 +1060,14 @@ get_scno(struct tcb *tcp)
> /*
> * Note: we only deal with only 32-bit CPUs here.
> */
> +
> + if (!(tcp->flags & TCB_INSYSCALL) &&
> + (tcp->flags & TCB_WAITEXECVE)) {
> + /* caught a fake syscall from the execve's
> exit */
> + tcp->flags &= ~TCB_WAITEXECVE;
> + return 0;
> + }
> +
> if (regs.ARM_cpsr & 0x20) {
>
> But this is already checked a bit earlier. Here is a bigger fragment.
> Look as the second "if":
>
> /*
> * We only need to grab the syscall number on syscall entry.
> */
> if (regs.ARM_ip == 0) {
> if (!(tcp->flags & TCB_INSYSCALL)) {
> /* Check if we return from execve. */
> if (tcp->flags & TCB_WAITEXECVE) {
Aha (-:
Then the patch can probably be nuked all together. My 0.02 € is that it
was needed for a previous version of strace, but was not nuked when
strace version was bumped in Buildroot.
<snipp>
--
Best regards,
Hans-Christian Egtvedt
More information about the Strace-devel
mailing list