From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933078Ab1IBByk (ORCPT ); Thu, 1 Sep 2011 21:54:40 -0400 Received: from mail-gw0-f46.google.com ([74.125.83.46]:62921 "EHLO mail-gw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933019Ab1IBByh (ORCPT ); Thu, 1 Sep 2011 21:54:37 -0400 Message-ID: <4E603758.6050003@gmail.com> Date: Thu, 01 Sep 2011 18:54:32 -0700 From: Nicholas Miell User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0) Gecko/20110816 Thunderbird/6.0 MIME-Version: 1.0 To: Cyrill Gorcunov CC: containers@lists.osdl.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Nathan Lynch , Oren Laadan , Daniel Lezcano , Glauber Costa , James Bottomley , Tejun Heo , Vasiliy Kulikov , "Kirill A. Shutemov" , Alexey Dobriyan , Al Viro , Andrew Morton , Pavel Emelyanov Subject: Re: [patch 2/2] fs, proc: Introduce the /proc//map_files/ directory v6 References: <20110831075814.003575573@openvz.org> <20110831080229.100652529@openvz.org> In-Reply-To: <20110831080229.100652529@openvz.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/31/2011 12:58 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-vma->vm_end", > the target is the file. Opening a symlink results in a file that point exactly > to the same inode as them vma's one. > > For example the ls -l of some arbitrary /proc//map_files/ > > | lr-x------ 1 root root 64 Aug 26 06:40 7f8f80403000-7f8f80404000 -> /lib64/libc-2.5.so > | lr-x------ 1 root root 64 Aug 26 06:40 7f8f8061e000-7f8f80620000 -> /lib64/libselinux.so.1 > | lr-x------ 1 root root 64 Aug 26 06:40 7f8f80826000-7f8f80827000 -> /lib64/libacl.so.1.1.0 > | lr-x------ 1 root root 64 Aug 26 06:40 7f8f80a2f000-7f8f80a30000 -> /lib64/librt-2.5.so > | lr-x------ 1 root root 64 Aug 26 06:40 7f8f80a30000-7f8f80a4c000 -> /lib64/ld-2.5.so This doesn't seem to fully export all the information passed to mmap(2) -- it encompasses the addr, size, fd and (assuming the generated symlink's permissions are accurate) prot parameters, but does nothing to export the flags or offset parameters.