From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:50840 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753630AbeBGNFb (ORCPT ); Wed, 7 Feb 2018 08:05:31 -0500 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w17D570K060961 for ; Wed, 7 Feb 2018 08:05:30 -0500 Received: from e06smtp13.uk.ibm.com (e06smtp13.uk.ibm.com [195.75.94.109]) by mx0b-001b2d01.pphosted.com with ESMTP id 2fyys1f50c-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Wed, 07 Feb 2018 08:05:29 -0500 Received: from localhost by e06smtp13.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 7 Feb 2018 13:05:28 -0000 Subject: Re: [RFC PATCH v4 1/2] fuse: introduce new fs_type flag FS_IMA_NO_CACHE From: Mimi Zohar To: Miklos Szeredi , Dongsu Park Cc: linux-kernel@vger.kernel.org, linux-integrity , LSM , linux-fsdevel@vger.kernel.org, Alban Crequy , Miklos Szeredi , Alexander Viro , Dmitry Kasatkin , James Morris , Christoph Hellwig , "Serge E . Hallyn" , Seth Forshee Date: Wed, 07 Feb 2018 08:05:21 -0500 In-Reply-To: References: <86832c6adb256f29f44b6229222b80964fc8cfcc.1517314847.git.dongsu@kinvolk.io> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Message-Id: <1518008721.13312.44.camel@linux.vnet.ibm.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Wed, 2018-02-07 at 10:21 +0100, Miklos Szeredi wrote: > On Tue, Jan 30, 2018 at 7:06 PM, Dongsu Park wrote: > > From: Alban Crequy > > > > 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 > > Cc: Alexander Viro > > Cc: Mimi Zohar > > Cc: Dmitry Kasatkin > > Cc: James Morris > > Cc: Christoph Hellwig > > Acked-by: "Serge E. Hallyn" > > Acked-by: Seth Forshee > > Tested-by: Dongsu Park > > Signed-off-by: Alban Crequy > > --- > > 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 Sure, thank you! Mimi