From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:44980 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751069AbdEJVBq (ORCPT ); Wed, 10 May 2017 17:01:46 -0400 Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id v4AKrtss024624 for ; Wed, 10 May 2017 17:01:46 -0400 Received: from e23smtp07.au.ibm.com (e23smtp07.au.ibm.com [202.81.31.140]) by mx0b-001b2d01.pphosted.com with ESMTP id 2abp5tkp86-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Wed, 10 May 2017 17:01:45 -0400 Received: from localhost by e23smtp07.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 11 May 2017 07:01:43 +1000 Subject: Re: [PATCH] security/ima: use fs method to read integrity data From: Mimi Zohar To: Christoph Hellwig , Boaz Harrosh Cc: Al Viro , linux-fsdevel@vger.kernel.org, linux-ima-devel@lists.sourceforge.net, linux-security-module@vger.kernel.org Date: Wed, 10 May 2017 17:00:47 -0400 In-Reply-To: <20170510132359.GA22549@lst.de> References: <20170510064507.1764-1-hch@lst.de> <20170510064507.1764-2-hch@lst.de> <20170510132359.GA22549@lst.de> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <1494450047.3006.28.camel@linux.vnet.ibm.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Wed, 2017-05-10 at 15:24 +0200, Christoph Hellwig wrote: > On Wed, May 10, 2017 at 03:20:41PM +0300, Boaz Harrosh wrote: > > Would you not want to call ->read_iter() in the NULL case > > and have all FSs supported as today? > > As IMA has particular requirements on the fs (e.g. that it can > read with i_rwsem held as seen in this patch, or useful i_version > which only the file systems converted in this patch do), having > an explicit opt-in seems much safer. This optional method is > a very easy way to provide this opt-in behavior. Without i_version support the file is measured/appraised once.  With i_version support it will be re-measured/appraised. As a file system is mounted/remounted, some sort of message should be emitted indicating whether i_version is supported.  That does not imply that there is no value in measuring/appraising the file only once. With this patch, the "opt-in" behavior, is only for measurement, not appraisal.  For appraisal, it still enforces file hash/signature verification, as it should, based on policy. Christoph, could we call ->read_iter() in the NULL case as Boaz suggested? thanks! Mimi