From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cyrill Gorcunov Subject: Re: [patch 2/2] fs, proc: Introduce the /proc//map_files/ directory v6 Date: Mon, 5 Sep 2011 23:20:09 +0400 Message-ID: <20110905192009.GJ761@sun> References: <20110831075814.003575573@openvz.org> <20110831080229.100652529@openvz.org> <20110831090612.GA3253@albatros> <20110831112642.GI25465@sun> <20110831140416.GA17626@shutemov.name> <20110831142622.GB30615@sun> <20110831151023.5b7e12da.akpm@linux-foundation.org> <20110901080508.GF30615@sun> <20110902163711.GA3124@albatros> <20110905185358.GA2103@albatros> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20110905185358.GA2103@albatros> Sender: linux-fsdevel-owner@vger.kernel.org To: Vasiliy Kulikov Cc: Andrew Morton , "Kirill A. Shutemov" , containers@lists.osdl.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Nathan Lynch , kernel-hardening@lists.openwall.com, Oren Laadan , Daniel Lezcano , Glauber Costa , James Bottomley , Tejun Heo , Alexey Dobriyan , Al Viro , Pavel Emelyanov List-Id: containers.vger.kernel.org On Mon, Sep 05, 2011 at 10:53:58PM +0400, Vasiliy Kulikov wrote: ... > > +static int pid_no_revalidate(struct dentry *dentry, struct nameidata *nd) > +{ > + if (nd && nd->flags & LOOKUP_RCU) > + return -ECHILD; > + > + d_drop(dentry); > + return 0; > +} > + Thanks Vasiliy! So every lookup will cause dcache to drop previous cached entry and alloc and hash new one instead, pretty dramatic, espec in case of huge number of files mapped ;) Still since it's not time critical operation (at least for now) I tend to agree. Cyrill From mboxrd@z Thu Jan 1 00:00:00 1970 Reply-To: kernel-hardening@lists.openwall.com Date: Mon, 5 Sep 2011 23:20:09 +0400 From: Cyrill Gorcunov Message-ID: <20110905192009.GJ761@sun> References: <20110831075814.003575573@openvz.org> <20110831080229.100652529@openvz.org> <20110831090612.GA3253@albatros> <20110831112642.GI25465@sun> <20110831140416.GA17626@shutemov.name> <20110831142622.GB30615@sun> <20110831151023.5b7e12da.akpm@linux-foundation.org> <20110901080508.GF30615@sun> <20110902163711.GA3124@albatros> <20110905185358.GA2103@albatros> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110905185358.GA2103@albatros> Subject: [kernel-hardening] Re: [patch 2/2] fs, proc: Introduce the /proc//map_files/ directory v6 To: Vasiliy Kulikov Cc: Andrew Morton , "Kirill A. Shutemov" , containers@lists.osdl.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Nathan Lynch , kernel-hardening@lists.openwall.com, Oren Laadan , Daniel Lezcano , Glauber Costa , James Bottomley , Tejun Heo , Alexey Dobriyan , Al Viro , Pavel Emelyanov List-ID: On Mon, Sep 05, 2011 at 10:53:58PM +0400, Vasiliy Kulikov wrote: ... > > +static int pid_no_revalidate(struct dentry *dentry, struct nameidata *nd) > +{ > + if (nd && nd->flags & LOOKUP_RCU) > + return -ECHILD; > + > + d_drop(dentry); > + return 0; > +} > + Thanks Vasiliy! So every lookup will cause dcache to drop previous cached entry and alloc and hash new one instead, pretty dramatic, espec in case of huge number of files mapped ;) Still since it's not time critical operation (at least for now) I tend to agree. Cyrill