From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:53256 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725824AbeJLGcx (ORCPT ); Fri, 12 Oct 2018 02:32:53 -0400 Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w9BN03F8008957 for ; Thu, 11 Oct 2018 19:03:24 -0400 Received: from e06smtp04.uk.ibm.com (e06smtp04.uk.ibm.com [195.75.94.100]) by mx0a-001b2d01.pphosted.com with ESMTP id 2n2ckw6x12-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 11 Oct 2018 19:03:24 -0400 Received: from localhost by e06smtp04.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 12 Oct 2018 00:03:22 +0100 Subject: Re: [PATCH 2/3] IMA: Make use of filesystem-provided hashes From: Mimi Zohar To: Matthew Garrett Cc: linux-integrity , Dmitry Kasatkin , miklos@szeredi.hu, linux-fsdevel@vger.kernel.org, Alexander Viro Date: Thu, 11 Oct 2018 19:03:07 -0400 In-Reply-To: References: <20181004203007.217320-1-mjg59@google.com> <20181004203007.217320-3-mjg59@google.com> <1539271386.11939.79.camel@linux.ibm.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Message-Id: <1539298987.11939.136.camel@linux.ibm.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Thu, 2018-10-11 at 13:30 -0700, Matthew Garrett wrote: > On Thu, Oct 11, 2018 at 8:23 AM Mimi Zohar wrote: > > > > On Thu, 2018-10-04 at 13:30 -0700, Matthew Garrett wrote: > > > Some filesystems may be able to provide hashes in an out of band manner, > > > and allowing them to do so is a performance win. This is especially true > > > of FUSE-based filesystems where otherwise we recalculate the hash on > > > every measurement. Make use of this by default, but provide a parameter > > > to force recalculation rather than trusting the filesystem. > > > > > > Signed-off-by: Matthew Garrett > > > > Support for not calculating the file hash would need to be finer > > grained than this, probably on a per mount basis. The default should > > be for IMA to always calculate the file hash, unless explicitly told > > not to. > > Ok, should this just be part of the IMA policy? How would you be able to differentiate between different FUSE filesystems for example? > > > IMA should never skip the file hash calculation if the filesystem is > > an untrusted mount (eg. SB_I_UNTRUSTED_MOUNTER). > > Ok. >