From: Denys Vlasenko <vda.linux@googlemail.com>
To: Pedro Alves <pedro@codesourcery.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>,
Oleg Nesterov <oleg@redhat.com>, Tejun Heo <tj@kernel.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] Make PTRACE_SEIZE set ptrace options specified in 'data'
Date: Fri, 9 Sep 2011 22:03:10 +0200 [thread overview]
Message-ID: <201109092203.10062.vda.linux@googlemail.com> (raw)
In-Reply-To: <201109091809.57272.pedro@codesourcery.com>
On Friday 09 September 2011 19:09, Pedro Alves wrote:
> > This would be a _very_ minor improvement, so tiny it's not worth
> > bothering with. Let me show you the real-world code (part of strace
> > source) which skips over unneeded PTRACE_EVENT_EXEC:
> >
> > if ((status >> 16) != 0)
> > /* Ptrace event (we ignore all of them for now) */
> > goto restart_tracee_with_sig_0;
> >
> > Yes. That is all.
> > It probably compiles into just two assembly instructions.
>
> WTH? I'm talking about _not forcing the tracee to stop_. Let
> me repeat. NOT FORCING THE TRACEE TO STOP.
No need to shout.
execve is such a rare syscall the one extra stop on it is not
going to be a problem.
> And about not needing to handle the magic unadorned SIGTRAP.
> The magic unadorned post-exec SIGTRAP does not have `status & 0xff00'
> set, it is not a ptrace event!
What SIGTRAP? With PTRACE_O_TRACEEXEC, there is no SIGTRAP.
> If we don't disable the magic SIGTRAP, there's no way for a
> tracer to do a very non-invasive SEIZE, say, a GDB mode that
> only cares to let the tracer run free to catch SIGSEGVs
> in some child, while later on during the run, the user remembers
> to set a breakpoint. At that point the tracer needs to catch
> exec events, so it'd enable TRACE_O_EVENTEXEC. Getting rid of
> the SIGTRAP gets rid of the spurious stops when TRACE_O_EVENTEXEC
> is not enabled.
This part I don't understand.
(btw, PTRACE_O_TRACEEXEC, not TRACE_O_EVENTEXEC).
--
vda
next prev parent reply other threads:[~2011-09-09 20:03 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-08 18:22 Denys Vlasenko
2011-09-08 19:24 ` Oleg Nesterov
2011-09-09 11:12 ` Pedro Alves
2011-09-09 12:28 ` Denys Vlasenko
2011-09-09 13:15 ` Pedro Alves
2011-09-09 16:30 ` Oleg Nesterov
2011-09-09 16:55 ` Denys Vlasenko
2011-09-09 17:09 ` Pedro Alves
2011-09-09 17:18 ` Oleg Nesterov
2011-09-09 20:03 ` Denys Vlasenko [this message]
2011-09-10 11:19 ` Pedro Alves
2011-09-10 11:40 ` Denys Vlasenko
2011-09-10 12:12 ` Pedro Alves
2011-09-10 15:36 ` Pedro Alves
2011-09-13 7:45 ` Indan Zupancic
2011-09-13 8:04 ` Indan Zupancic
2011-09-10 23:34 ` Tejun Heo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201109092203.10062.vda.linux@googlemail.com \
--to=vda.linux@googlemail.com \
--cc=dvlasenk@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg@redhat.com \
--cc=pedro@codesourcery.com \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome