From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Kirill A. Shutemov" Subject: Re: [patch 2/2] fs, proc: Introduce the /proc//map_files/ directory v6 Date: Wed, 31 Aug 2011 17:04:16 +0300 Message-ID: <20110831140416.GA17626@shutemov.name> References: <20110831075814.003575573@openvz.org> <20110831080229.100652529@openvz.org> <20110831090612.GA3253@albatros> <20110831112642.GI25465@sun> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Vasiliy Kulikov , 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 , Alexey Dobriyan , Al Viro , Andrew Morton , Pavel Emelyanov To: Cyrill Gorcunov Return-path: Received: from shutemov.name ([188.40.19.243]:37210 "EHLO shutemov.name" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750792Ab1HaOER (ORCPT ); Wed, 31 Aug 2011 10:04:17 -0400 Content-Disposition: inline In-Reply-To: <20110831112642.GI25465@sun> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Wed, Aug 31, 2011 at 03:26:42PM +0400, Cyrill Gorcunov wrote: > On Wed, Aug 31, 2011 at 01:06:12PM +0400, Vasiliy Kulikov wrote: > > Hi, > > > > On Wed, Aug 31, 2011 at 11:58 +0400, 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. > > > > I'm late noting it before the RFCv6 :) Besides checking > > ptrace_may_access() on ->lookup and ->readdir you also should define > > ->stat, otherwise you can bypass ptrace checks if there is a > > corresponding dentry in the cache. The same issue existed in fd* handlers: > > > > http://www.openwall.com/lists/kernel-hardening/2011/08/29/1 > > > > OK, here is an updated one. Thanks for feedback. Hope this time > all nits are addressed. Still reviews/complains are *very* appreciated. Please run checkpatch. It points several warnings and one dangerous error. -- Kirill A. Shutemov