[PATCH] fix bad syscall on ARM architecture

Bernhard Reutner-Fischer rep.dot.nop at gmail.com
Fri Feb 20 20:51:14 UTC 2009


On Fri, Feb 20, 2009 at 01:23:23PM +0100, Hans-Christian Egtvedt wrote:
>Hi,
>
>The attached patch fixes a bad syscall on ARM architecture. I am not
>the author, but this patch has been living inside Buildroot [0] for a
>while, so IMHO should be added upstream if it actually fixes a problem.
>
>The original commit message for the patch was "add fix for ARM fake
>syscall from execve.". Patch added by aldot at uclibc.org.
>
>-- 
>Best regards,
>Hans-Christian Egtvedt
>--- 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.

s/with only/with/;# while you're committing this, please.

> 		 */
>+
>+		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) {
> 			/*
> 			 * Get the Thumb-mode system call number





More information about the Strace-devel mailing list