From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cyrill Gorcunov Subject: Re: [RFC] fs, proc: Introduce the /proc//map_files/ directory v2 Date: Wed, 24 Aug 2011 19:22:22 +0400 Message-ID: <20110824152222.GZ29452@sun> References: <20110824085329.GL29452@sun> <4E551331.1010709@acm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Nathan Lynch , Oren Laadan , Daniel Lezcano , Tejun Heo , Andrew Morton , Glauber Costa , containers@lists.osdl.org, linux-kernel@vger.kernel.org, Pavel Emelyanov , Serge Hallyn , LINUXFS-ML , James Bottomley To: Zan Lynx Return-path: Received: from mail-bw0-f46.google.com ([209.85.214.46]:64208 "EHLO mail-bw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750893Ab1HXPWb (ORCPT ); Wed, 24 Aug 2011 11:22:31 -0400 Content-Disposition: inline In-Reply-To: <4E551331.1010709@acm.org> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Wed, Aug 24, 2011 at 09:05:21AM -0600, Zan Lynx wrote: > On 8/24/2011 2:53 AM, Cyrill Gorcunov wrote: > > From: Pavel Emelyanov > > > > This one behaves similarly to the /proc//fd/ one - it contains symlinks > > one for each mapping with file, the name of a symlink is vma->vm_start, the > > target is the file. Opening a symlink results in a file that point exactly > > to the same inode as them vma's one. > > > > This thing is aimed to help checkpointing processes. > > > > For example the ls -l of some arbitrary /proc//map_files/ > > > > | lr-x------ 1 cyrill cyrill 64 Aug 9 15:25 0x3d73a00000 -> /lib64/ld-2.5.so > [snip] > > Just curious: How do these symlinks work when the process reading a > /proc file is in a chroot or a different namespace? > > For example, a chroot environment might have independent copies of > /lib64/ld-2.5.so and a bind mount of /proc. Does the symlink then point > to the wrong file? To be fair, I personally didn't tried such scenario but it should be the same behaviour as for /proc/$pid/fd since data is taken from a task pointed by pid. I'll check though, good question. Cyrill