lkml.org 
[lkml]   [2018]   [Feb]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC PATCH v4 1/2] fuse: introduce new fs_type flag FS_IMA_NO_CACHE
From
Date
On Wed, 2018-02-07 at 10:21 +0100, Miklos Szeredi wrote:
> On Tue, Jan 30, 2018 at 7:06 PM, Dongsu Park <dongsu@kinvolk.io> wrote:
> > From: Alban Crequy <alban@kinvolk.io>
> >
> > This new fs_type flag FS_IMA_NO_CACHE means files should be re-measured,
> > re-appraised and re-audited each time. Cached integrity results should
> > not be used.
> >
> > It is useful in FUSE because the userspace FUSE process can change the
> > underlying files at any time without notifying the kernel.
> >
> > Cc: linux-kernel@vger.kernel.org
> > Cc: linux-integrity@vger.kernel.org
> > Cc: linux-security-module@vger.kernel.org
> > Cc: linux-fsdevel@vger.kernel.org
> > Cc: Miklos Szeredi <miklos@szeredi.hu>
> > Cc: Alexander Viro <viro@zeniv.linux.org.uk>
> > Cc: Mimi Zohar <zohar@linux.vnet.ibm.com>
> > Cc: Dmitry Kasatkin <dmitry.kasatkin@gmail.com>
> > Cc: James Morris <jmorris@namei.org>
> > Cc: Christoph Hellwig <hch@infradead.org>
> > Acked-by: "Serge E. Hallyn" <serge@hallyn.com>
> > Acked-by: Seth Forshee <seth.forshee@canonical.com>
> > Tested-by: Dongsu Park <dongsu@kinvolk.io>
> > Signed-off-by: Alban Crequy <alban@kinvolk.io>
> > ---
> > fs/fuse/inode.c | 2 +-
> > include/linux/fs.h | 1 +
> > 2 files changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c
> > index 624f18bb..0a9e5164 100644
> > --- a/fs/fuse/inode.c
> > +++ b/fs/fuse/inode.c
> > @@ -1205,7 +1205,7 @@ static void fuse_kill_sb_anon(struct super_block *sb)
> > static struct file_system_type fuse_fs_type = {
> > .owner = THIS_MODULE,
> > .name = "fuse",
> > - .fs_flags = FS_HAS_SUBTYPE,
> > + .fs_flags = FS_HAS_SUBTYPE | FS_IMA_NO_CACHE,
> > .mount = fuse_mount,
> > .kill_sb = fuse_kill_sb_anon,
> > };
> > diff --git a/include/linux/fs.h b/include/linux/fs.h
> > index 511fbaab..ced841ba 100644
> > --- a/include/linux/fs.h
> > +++ b/include/linux/fs.h
> > @@ -2075,6 +2075,7 @@ struct file_system_type {
> > #define FS_BINARY_MOUNTDATA 2
> > #define FS_HAS_SUBTYPE 4
> > #define FS_USERNS_MOUNT 8 /* Can be mounted by userns root */
> > +#define FS_IMA_NO_CACHE 16 /* Force IMA to re-measure, re-appraise, re-audit files */
>
> I think it would be more logical to change the order of the patches
> (i.e. first patch adds this constant and the code handling it, and
> second patch just adds it to fuse's .fs_flags).
>
> Otherwise
>
> Acked-by: Miklos Szeredi <mszeredi@redhat.com>

Sure, thank you!

Mimi

\
 
 \ /
  Last update: 2018-02-07 14:06    [W:0.098 / U:1.052 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site