From mboxrd@z Thu Jan 1 00:00:00 1970 From: Zan Lynx Subject: Re: [RFC] fs, proc: Introduce the /proc//map_files/ directory v2 Date: Wed, 24 Aug 2011 09:05:21 -0600 Message-ID: <4E551331.1010709@acm.org> References: <20110824085329.GL29452@sun> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20110824085329.GL29452@sun> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Cyrill Gorcunov Cc: Pavel Emelyanov , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, James Bottomley , containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org, Nathan Lynch , Tejun Heo , LINUXFS-ML , Daniel Lezcano , Andrew Morton List-Id: containers.vger.kernel.org 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? From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752116Ab1HXPcK (ORCPT ); Wed, 24 Aug 2011 11:32:10 -0400 Received: from 74-92-214-37-Colorado.hfc.comcastbusiness.net ([74.92.214.37]:33171 "EHLO zlynx.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750917Ab1HXPcI (ORCPT ); Wed, 24 Aug 2011 11:32:08 -0400 X-Greylist: delayed 1500 seconds by postgrey-1.27 at vger.kernel.org; Wed, 24 Aug 2011 11:32:08 EDT Message-ID: <4E551331.1010709@acm.org> Date: Wed, 24 Aug 2011 09:05:21 -0600 From: Zan Lynx User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0) Gecko/20110812 Thunderbird/6.0 MIME-Version: 1.0 To: Cyrill Gorcunov 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 Subject: Re: [RFC] fs, proc: Introduce the /proc//map_files/ directory v2 References: <20110824085329.GL29452@sun> In-Reply-To: <20110824085329.GL29452@sun> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Envelope-From: zlynx@acm.org X-Spam-Id: 20110824/1QwF1R-000763-5Q-linux-kernel@vger.kernel.org:zlynx@acm.org:74.92.214.37 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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?