lkml.org 
[lkml]   [2022]   [Feb]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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@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!

\
 
 \ /
  Last update: 2022-02-07 07:10    [W:0.052 / U:0.748 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site