From mboxrd@z Thu Jan 1 00:00:00 1970 From: Al Viro Subject: Re: [patch 04/11] vfs: introduce new LSM hooks where vfsmount is available. Date: Sat, 6 Dec 2008 18:29:02 +0000 Message-ID: <20081206182902.GP28946@ZenIV.linux.org.uk> References: <200812012234.mB1MYsqc021084@imap1.linux-foundation.org> <20081206071009.GO28946@ZenIV.linux.org.uk> <200812062124.IEE78637.MFJFFOVSOtOHLQ@I-love.SAKURA.ne.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: akpm@linux-foundation.org, linux-fsdevel@vger.kernel.org, takedakn@nttdata.co.jp, casey@schaufler-ca.com, crispin@crispincowan.com, haradats@nttdata.co.jp, hch@lst.de, jmorris@namei.org, sds@tycho.nsa.gov To: Tetsuo Handa Return-path: Received: from zeniv.linux.org.uk ([195.92.253.2]:44843 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751631AbYLFS3K (ORCPT ); Sat, 6 Dec 2008 13:29:10 -0500 Content-Disposition: inline In-Reply-To: <200812062124.IEE78637.MFJFFOVSOtOHLQ@I-love.SAKURA.ne.jp> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Sat, Dec 06, 2008 at 09:24:31PM +0900, Tetsuo Handa wrote: > > Humm... What's the story with the last argument (struct file *) in there? > > Explain that and you've got it merged; other than this part I have no > > objections to that patch. > > do_sys_ftruncate() calls do_truncate() with "struct file *", whereas > do_sys_truncate() and may_open() call do_truncate() with NULL. > TOMOYO is not using the last argument, but I'm passing all arguments without > modification so that a LSM module can know the last argument if that LSM module > needs the last argument. And if such a module ever shows up *and* its authors can give good reasons for checks in that place that apply to ftruncate(2) but not to truncate(2), we can always add such argument. Until then... Note that similar story with struct nameidata * being passed to fs methods had caused a lot of mess and we are still not through with it. Let's stick to the things that make clear sense...