From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pavel Emelyanov Subject: Re: [RFC] fs, proc: Introduce the /proc//map_files/ directory v2 Date: Tue, 13 Sep 2011 18:20:56 +0400 Message-ID: <4E6F66C8.5020406@parallels.com> References: <20110824085329.GL29452@sun> <20110913141412.GB7604@ucw.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Cyrill Gorcunov , Nathan Lynch , Oren Laadan , Daniel Lezcano , Tejun Heo , Andrew Morton , Glauber Costa , "containers@lists.osdl.org" , "linux-kernel@vger.kernel.org" , Serge Hallyn , LINUXFS-ML , James Bottomley To: Pavel Machek Return-path: Received: from mailhub.sw.ru ([195.214.232.25]:18674 "EHLO relay.sw.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753933Ab1IMOVH (ORCPT ); Tue, 13 Sep 2011 10:21:07 -0400 In-Reply-To: <20110913141412.GB7604@ucw.cz> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On 09/13/2011 06:14 PM, Pavel Machek wrote: > Hi! > >> 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. > > Is it good idea security-wise? It looks like symlink but does not > behave like one. (And yes, I know we already have similar problems in > /proc..) What exactly doesn't behave like symlink, can you elaborate, please? > ptrace-may-trace is not good enough protection; I can do this on my > own thread to get around read-only protection on fd. (File can be > protected from me by directory permissions.) I think this issue worth separate discussion and if it turns out there is a problem with that we can fix it together with /proc/pid/fd and other stuff. Thanks, Pavel