public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Matt Helsley <matthltc@us.ibm.com>
To: Grzegorz Nosek <root@localdomain.pl>
Cc: Matt Helsley <matthltc@us.ibm.com>,
	Oleg Nesterov <oleg@redhat.com>,
	Roland McGrath <roland@redhat.com>,
	Sukadev Bhattiprolu <sukadev@us.ibm.com>,
	containers@lists.linux-foundation.org,
	linux-kernel@vger.kernel.org
Subject: Re: Testing lxc 0.6.5 in Fedora 13
Date: Fri, 26 Mar 2010 05:54:59 -0700	[thread overview]
Message-ID: <20100326125459.GD3345@count0.beaverton.ibm.com> (raw)
In-Reply-To: <20100326124522.GD17113@megiteam.pl>

On Fri, Mar 26, 2010 at 01:45:22PM +0100, Grzegorz Nosek wrote:
> On Fri, Mar 26, 2010 at 04:53:57AM -0700, Matt Helsley wrote:
> > Yup. strace would need to be modified to use that. I tried that and it still
> > won't work -- I seem to recall it didn't work because strace uses pid values
> > obtained from the wait syscall too. To make it work we'd need to be able to
> > translate those pids in userspace. That's do-able from userspace if you trace
> > all forks descending from the pidns init task. But it's not do-able for
> > simple attaches. That's why I was thinking Eric's setns() might be able to
> > help if strace used it to enter the tracee's pid namespace whenever we need to.
> > 
> > gdb often doesn't use the same methods but has similar problems with pid
> > namespaces.
> 
> Hmm, is there a good reason why strace does not use the data explicitly
> provided by the kernel but instead second-guesses it from syscall return
> values? I don't know anything about ptrace, really, but I'd expect the

strace isn't linux-only. Checking the syscall return values may be seen
as being more portable. At least that's my guess. That said there are
plenty of #ifdefs in strace and patching it to use GETEVENTMSG is quite
a small patch.

However, as I said, that still doesn't "fix" strace so that it can
be used to trace tasks in child pid namespaces. Especially when the
traced tasks are more than one namepace deeper. :(

> kernel to provide the tracer with out-of-band information otherwise
> taken from clone/waitpid/other syscalls?

I don't think the kernel provides special out-of-band methods for fetching
pids related to traced tasks except during fork and clone. Not wait*(). The
rest of ptrace tends to be focused on reading/writing registers/memory and
managing signal delivery.

Cheers,
	-Matt Helsley

  reply	other threads:[~2010-03-26 12:55 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20100321195044.GA23757@megiteam.pl>
2010-03-23 21:28 ` Testing lxc 0.6.5 in Fedora 13 Matt Helsley
2010-03-24  9:25   ` Greg Kurz
2010-03-25 21:33   ` Grzegorz Nosek
2010-03-26 11:11     ` Oleg Nesterov
2010-03-26 11:32       ` Grzegorz Nosek
2010-03-26 12:00         ` Oleg Nesterov
2010-03-26 12:46           ` Matt Helsley
2010-03-26 13:34             ` Oleg Nesterov
2010-03-26 11:53       ` Matt Helsley
2010-03-26 12:45         ` Grzegorz Nosek
2010-03-26 12:54           ` Matt Helsley [this message]
2010-03-26 13:56             ` Oleg Nesterov
2010-03-26 13:47           ` Oleg Nesterov
2010-04-06  3:44             ` Roland McGrath
2010-04-06 13:53               ` Matt Helsley
2010-04-06 14:36                 ` Oleg Nesterov
2010-04-06 15:17                   ` Eric W. Biederman
2010-04-06 15:13                 ` Eric W. Biederman
2010-04-06 15:29                   ` Matt Helsley

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=20100326125459.GD3345@count0.beaverton.ibm.com \
    --to=matthltc@us.ibm.com \
    --cc=containers@lists.linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oleg@redhat.com \
    --cc=roland@redhat.com \
    --cc=root@localdomain.pl \
    --cc=sukadev@us.ibm.com \
    /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