Re: [PATCH 0/3] Handle chroot tasks properly (v1)

From: Namhyung Kim
Date: Tue Feb 01 2022 - 15:02:04 EST


Hi Andi,

On Mon, Jan 31, 2022 at 5:16 PM Andi Kleen <ak@xxxxxxxxxxxxxxx> wrote:
>
>
> On 1/28/2022 12:39 PM, Namhyung Kim wrote:
> > Hello,
> >
> > I found that perf tools don't work well with tasks in a chroot. The
> > filenames in MMAP record are from the root directory of the task so
> > it's different than what it sees from outside.
>
>
> While that's a real problem, and for chroot it can be fixed, it's much
> more complicated for the more complex container namespace case with
> custom mounts, including loop back, etc.

Probably. Note that perf tool can handle namespaces (to some extent)
but missed chroot support. I have a bug report because of this issue.
Let's fix the simple case first.

>
> It seems it really need some kind of agent to handle all cases. For
> example the agent could understand container metadata formats and then
> do the right thing.

Sounds like a good idea for a long term solution.

Thanks,
Namhyung