From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: Problem with accessing namespace_sem from LSM. Date: Wed, 7 Nov 2007 22:45:23 +0000 Message-ID: <20071107224523.GA8223@infradead.org> References: <200711060400.lA640fuE078356@www262.sakura.ne.jp> <20071106133559.GA13366@infradead.org> <200711062352.CIJ34385.LSOHJFOVFFOtMQ@I-love.SAKURA.ne.jp> <20071107173039.GA25560@infradead.org> <200711080704.CHC65673.OOtFJFFSHQVOML@I-love.SAKURA.ne.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: hch@infradead.org, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, crispin@crispincowan.com To: Tetsuo Handa Return-path: Received: from pentafluge.infradead.org ([213.146.154.40]:42710 "EHLO pentafluge.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752605AbXKGWpZ (ORCPT ); Wed, 7 Nov 2007 17:45:25 -0500 Content-Disposition: inline In-Reply-To: <200711080704.CHC65673.OOtFJFFSHQVOML@I-love.SAKURA.ne.jp> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Thu, Nov 08, 2007 at 07:04:23AM +0900, Tetsuo Handa wrote: > The reason why I want to access namespace_sem inside security_inode_create() is that > it doesn't receive "struct vfsmount" parameter. > If "struct vfsmount" *were* passed to security_inode_create(), > I have no need to access namespace_sem. Same argument as with the AA folks: it does not have any business looking at the vfsmount. If you create a file it can and in many setups will show up in multiple vfsmounts, so making decisions based on the particular one this creat happens through is wrong and actually dangerous.