Received: by 10.223.176.5 with SMTP id f5csp633160wra; Wed, 7 Feb 2018 05:06:57 -0800 (PST) X-Google-Smtp-Source: AH8x226usuyVXF69USx8RBJSHBGYOyfL2JhWVOJgjJ+au8X3p42sbTcsDwgnLcLZ+ps7bEn8chWk X-Received: by 2002:a17:902:a9ca:: with SMTP id b10-v6mr6075147plr.223.1518008817238; Wed, 07 Feb 2018 05:06:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518008817; cv=none; d=google.com; s=arc-20160816; b=ZFaFNQyAlen0AAjc1qTIupdxVSPY0J7q4JJXZUx+ss0bAvOLurUlOuSr4kFOZQIb6Z HxalFj8yJMypFRey4uUJWtsQ8zChVnRb8ERTsgFmN0ihAjGpFPuF0R5oP5N+80A4RBEC RK6HUrJBS6qpHVjN6pgp4vA2zI11S3h4qCmCnntwXuVdDu03CfBeT9+MMav5znYXsGBW TBXcBOp5jTAJy52kFNIVAF/Mg6pBSHWEYZDqRQFl7eRATl4HHsHAn9QP9u29tdMsibkc 8JxmpXWq/fPpum5k5xXWttJwCDBbOYa0MqukBzbTPK1MxkPu4ldtaeYDzw/IKHB70/L5 w1pQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-transfer-encoding :mime-version:references:in-reply-to:date:cc:to:from:subject :arc-authentication-results; bh=J+m01/AcWupVBpBDXh0JV3KIG7GOWW0Z3wgUh4BYBps=; b=epXO0ILM6aeNOmqspUyPZEUgyaTcYwNgMxXKDx+CbZYXHsAxVNwISesttL1refULF7 lmwnQgzmlksXH7M239pOwIOy2nrwhnDoy072bbl0bb3ObBAranisJFrtVrxDPCwTf6SN E2zJS1A/QPiXHdFcJwnEvNXraIhbe9ADoaB3BhClZHBl3OrNwozLJjhqExRuA2Q359Mj 9F33WS5O+NDBw+RLvH2D/qL3kw3WuUkzZm0AwA4ugIL0Uu75W36I3w1FWv5brZrmq16N NiOUQARaRF5wYgmYUJQptAcN+W6X/b4yy+toUNx0ArHP0eIawuKlpobaHAJancC800VB NULg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f9-v6si1062830pln.211.2018.02.07.05.06.43; Wed, 07 Feb 2018 05:06:57 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753696AbeBGNFf (ORCPT + 99 others); Wed, 7 Feb 2018 08:05:35 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:59212 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753630AbeBGNFd (ORCPT ); Wed, 7 Feb 2018 08:05:33 -0500 Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w17D5Kw8105922 for ; Wed, 7 Feb 2018 08:05:32 -0500 Received: from e06smtp13.uk.ibm.com (e06smtp13.uk.ibm.com [195.75.94.109]) by mx0a-001b2d01.pphosted.com with ESMTP id 2fyxkyaava-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Wed, 07 Feb 2018 08:05:31 -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 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp13.uk.ibm.com (192.168.101.143) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 7 Feb 2018 13:05:24 -0000 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w17D5OpU7536876; Wed, 7 Feb 2018 13:05:24 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A82FD11C050; Wed, 7 Feb 2018 12:58:46 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D419C11C04C; Wed, 7 Feb 2018 12:58:44 +0000 (GMT) Received: from localhost.localdomain (unknown [9.80.80.204]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 7 Feb 2018 12:58:44 +0000 (GMT) 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" X-Mailer: Evolution 3.20.5 (3.20.5-1.fc24) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 18020713-0012-0000-0000-000005AC4E47 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18020713-0013-0000-0000-00001928058A Message-Id: <1518008721.13312.44.camel@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-02-07_04:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1802070165 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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