NOMMU bogus syscall return values

Dmitry V. Levin ldv at altlinux.org
Thu Mar 3 23:39:38 UTC 2016


On Wed, Mar 02, 2016 at 09:29:24PM -0500, Rich Felker wrote:
> On Thu, Mar 03, 2016 at 05:16:18AM +0300, Dmitry V. Levin wrote:
> > On Wed, Mar 02, 2016 at 08:28:30PM -0500, Rich Felker wrote:
[...]
> > > What should be done about daemonized tracer mode?
> > 
> > If we could switch stack before clone and then switch stack back in the
> > child process, it would be a relatively simple change.
> > Otherwise I don't see any simple options.
> 
> I think it's possible to switch stack in the parent via sigaltstack
> and raise, after which the cloned child can longjmp back to the stack
> that was the parent's.

This might work.  Whatever signal is chosen, its handler and mask would
have to be restored before the final execve call.

> Alternatively the child could just re-enter
> main() on a new stack with a global var set to indicate that it's the
> tracer child.

I think it would be too risky to let the main bulk of strace code run
on the new stack.


-- 
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20160304/d33d30ce/attachment.bin>


More information about the Strace-devel mailing list