NOMMU bogus syscall return values

Mike Frysinger vapier at gentoo.org
Mon Feb 29 22:59:44 UTC 2016


On 29 Feb 2016 15:56, Rich Felker wrote:
> I've been trying to use strace on a NOMMU system (sh2) and have been
> experiencing an issue where the return value (read from r0) and args
> 5/6 (r0,r1) are bogus, making the output much less useful than it
> otherwise would be. The problem seems to be that the tracer is
> desynced with the child's STOP parity and is confusing syscall
> entry/exit, probably due to exec_or_die not stopping itself before
> exec to sync with the parent. Even if not for the bug I'm
> experiencing, this seems to be problematic in that early syscalls in
> the child can be lost (I've actually hit that problem too).

on Blackfin, strace was always flaky beyond the first process.
i never got around to tracking it down.

> The attached (very hackish at the moment) patch makes it work for me
> by eliminating the need to define NOMMU_SYSTEM to 1 and using clone()
> with CLONE_VM and a new stack for the child, instead of vfork. I see
> some potential issues that need to be addressed before this could be
> made into a proper solution, though:
> 
> 1. I'm not sure if all NOMMU systems strace supports have clone. If
>    so, I think vfork could be dropped completely and this used
>    instead.

uClibc has long required clone, so seems safe to assume it exists
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20160229/e100a6f0/attachment.bin>


More information about the Strace-devel mailing list