Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751763AbeAPLfp (ORCPT + 1 other); Tue, 16 Jan 2018 06:35:45 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:56736 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750892AbeAPLfo (ORCPT ); Tue, 16 Jan 2018 06:35:44 -0500 Subject: Re: [PATCH] ima,fuse: introduce new fs flag FS_NO_IMA_CACHE From: Mimi Zohar To: Alban Crequy , Alban Crequy Cc: Iago =?ISO-8859-1?Q?L=F3pez?= Galeiras , Dongsu Park , linux-integrity@vger.kernel.org, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, Miklos Szeredi , Seth Forshee , Christoph Hellwig Date: Tue, 16 Jan 2018 06:35:34 -0500 In-Reply-To: References: <20180115144804.GA28856@infradead.org> <20180116104121.4231-1-alban@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: 8bit X-TM-AS-GCONF: 00 x-cbid: 18011611-0008-0000-0000-000004C2538C X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18011611-0009-0000-0000-00001E55BDB9 Message-Id: <1516102534.6607.103.camel@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-01-16_05:,, 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-1801160165 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: > > > > /* > > - * Reset the measure, appraise and audit cached flags either if > > - * ima_inode_setxattr was called or based on policy, forcing > > - * the file to be re-evaluated. > > + * Reset the measure, appraise and audit cached flags either if: > > + * - ima_inode_setxattr was called, or > > + * - based on policy ("force"), or > > + * - based on filesystem feature flag > > + * forcing the file to be re-evaluated. > > */ > > Now that I think about it, it's also possible to write this patch > without basing it on Mimi's patch "ima: define a new policy option > named force", which is not in next-integrity yet. Should I try that? Yes, thank you.  As you're proposing a new flag, please remember to Cc the fsdevel mailing list as well. Mimi > > > if (test_and_clear_bit(IMA_CHANGE_XATTR, &iint->atomic_flags)) { > > iint->flags &= ~IMA_DONE_MASK; > > - } else if (action & IMA_FORCE) { > > + } else if (action & IMA_FORCE || inode->i_sb->s_type->fs_flags & FS_NO_IMA_CACHE) { > > if (action & IMA_MEASURE) { > > iint->measured_pcrs = 0; > > iint->flags &= > > -- > > 2.13.6 > > >