lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20220207033117.GA1240868@leoy-ThinkPad-X240s>
Date:   Mon, 7 Feb 2022 11:31:17 +0800
From:   Leo Yan <leo.yan@...aro.org>
To:     Arnaldo Carvalho de Melo <acme@...nel.org>
Cc:     James Clark <james.clark@....com>,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Mark Rutland <mark.rutland@....com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Jiri Olsa <jolsa@...hat.com>,
        Namhyung Kim <namhyung@...nel.org>,
        Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        Andrii Nakryiko <andrii@...nel.org>,
        Martin KaFai Lau <kafai@...com>,
        Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
        John Fastabend <john.fastabend@...il.com>,
        KP Singh <kpsingh@...nel.org>, Ian Rogers <irogers@...gle.com>,
        linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1] perf synthetic-events: Return error if procfs isn't
 mounted for PID namespaces

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@....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!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ