Linux Perf Users
 help / color / mirror / Atom feed
From: Leo Yan <leo.yan@linaro.org>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: James Clark <james.clark@arm.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@redhat.com>, Namhyung Kim <namhyung@kernel.org>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Andrii Nakryiko <andrii@kernel.org>,
	Martin KaFai Lau <kafai@fb.com>, Song Liu <songliubraving@fb.com>,
	Yonghong Song <yhs@fb.com>,
	John Fastabend <john.fastabend@gmail.com>,
	KP Singh <kpsingh@kernel.org>, Ian Rogers <irogers@google.com>,
	linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1] perf synthetic-events: Return error if procfs isn't mounted for PID namespaces
Date: Mon, 7 Feb 2022 11:31:17 +0800	[thread overview]
Message-ID: <20220207033117.GA1240868@leoy-ThinkPad-X240s> (raw)
In-Reply-To: <Yf+1HQ9+7TPmSSr7@kernel.org>

On Sun, Feb 06, 2022 at 08:46:37AM -0300, Arnaldo Carvalho de Melo wrote:
> Em Fri, Feb 04, 2022 at 08:48:49PM +0800, Leo Yan escreveu:
> > On Fri, Jan 07, 2022 at 02:27:57PM +0000, James Clark wrote:
> > > On 24/12/2021 12:40, Leo Yan wrote:
> > > > For perf recording, it retrieves process info by iterating nodes in proc
> > > > fs.  If we run perf in a non-root PID namespace with command:
> > > > 
> > > >   # unshare --fork --pid perf record -e cycles -a -- test_program
> > > > 
> > > > ... in this case, unshare command creates a child PID namespace and
> > > > launches perf tool in it, but the issue is the proc fs is not mounted
> > > > for the non-root PID namespace, this leads to the perf tool gathering
> > > > process info from its parent PID namespace.
> > > > 
> > > 
> > > I had some concerns that this would prevent use of perf in docker, but docker
> > > does mount /proc so it is still working. And you've added a warning about how
> > > to fix the unshare command so I think this is ok.
> > > 
> > > Reviewed-by: James Clark <james.clark@arm.com>
> > 
> > Thanks a lot for review, James.
> > 
> > Arnaldo, Jiri, could you take a look for this patch?  Thanks!
> 
> Looks sane, there was discussion, a detailed set of steps to reproduce
> the problem was provided, thanks, applied.

Thank you, Arnaldo!

      reply	other threads:[~2022-02-07  6:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-24 12:40 [PATCH v1] perf synthetic-events: Return error if procfs isn't mounted for PID namespaces Leo Yan
2021-12-24 12:43 ` Leo Yan
2022-01-07 14:27 ` James Clark
2022-02-04 12:48   ` Leo Yan
2022-02-06 11:46     ` Arnaldo Carvalho de Melo
2022-02-07  3:31       ` Leo Yan [this message]

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=20220207033117.GA1240868@leoy-ThinkPad-X240s \
    --to=leo.yan@linaro.org \
    --cc=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=irogers@google.com \
    --cc=james.clark@arm.com \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@redhat.com \
    --cc=kafai@fb.com \
    --cc=kpsingh@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=songliubraving@fb.com \
    --cc=yhs@fb.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