From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dave Chinner Subject: Re: [PATCH 0/2] ima: policy search speedup Date: Wed, 12 Dec 2012 09:16:23 +1100 Message-ID: <20121211221623.GC16353@dastard> References: <1355234914.2356.85.camel@falcor> <1355252842.2356.137.camel@falcor> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Eric Paris , Linus Torvalds , "Kasatkin, Dmitry" , Al Viro , linux-fsdevel , LSM List , Linux Kernel Mailing List , James Morris To: Mimi Zohar Return-path: Received: from ipmail07.adl2.internode.on.net ([150.101.137.131]:4825 "EHLO ipmail07.adl2.internode.on.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753634Ab2LKWQ1 (ORCPT ); Tue, 11 Dec 2012 17:16:27 -0500 Content-Disposition: inline In-Reply-To: <1355252842.2356.137.camel@falcor> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Tue, Dec 11, 2012 at 02:07:22PM -0500, Mimi Zohar wrote: > On Tue, 2012-12-11 at 13:09 -0500, Eric Paris wrote: > > On Tue, Dec 11, 2012 at 12:55 PM, Linus Torvalds > > wrote: > > > > > And your "pseudo-filesystems" argument is pretty stupid too, since WE > > > ALREADY HAVE A FLAG FOR THAT! > > > > > > Guess where it is? Oh, it's in the place I already mentioned makes > > > more sense. Look for S_PRIVATE in inode->i_flags, and IS_PRIVATE() in > > > users. It's what the other security models already use to avoid > > > bothering calling down to the security layers. The fact that the > > > integrity layer bypasses the normal security layer in > > > ima_file_check(), for example, is no excuse to then make up totally > > > new flags. > > > > IS_PRIVATE() is not used by and darn well better not be used by, all > > psuedo filesystems like procfs which IMA may want to ignore. LSMs > > like to do control on them. I thought S_PRIVATE was really only used > > by the anon_inode and reiserfs's really crazy ass internal inodes. I > > could always be wrong. > > I was actually wondering about the MS_NOSEC flag. It's currently being > used by fuse, gfs2, ocfs2 and tmpfs. (Not sure about xfs.) Can someone > explain what it is being used for? For determining whether to clearing suid bits on writes to a file. It defaults to on for all filesystems that use mount_bdev(), which is just about every local filesystem (include XFS). Cheers, Dave. -- Dave Chinner david@fromorbit.com