From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751357AbdJBMZY (ORCPT ); Mon, 2 Oct 2017 08:25:24 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:49852 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751062AbdJBMZV (ORCPT ); Mon, 2 Oct 2017 08:25:21 -0400 Subject: Re: [RFC PATCH 3/3] fs: detect that the i_rwsem has already been taken exclusively From: Mimi Zohar To: "Eric W. Biederman" Cc: Dave Chinner , Linus Torvalds , LSM List , linux-fsdevel , Christoph Hellwig , "Theodore Ts'o" , Jan Kara , Linux Kernel Mailing List , linux-integrity@vger.kernel.org, Sascha Hauer Date: Mon, 02 Oct 2017 08:25:09 -0400 In-Reply-To: <87zi9ai63l.fsf@xmission.com> References: <20170928220215.GC15067@dastard> <1506643967.5691.46.camel@linux.vnet.ibm.com> <1506649980.5691.100.camel@linux.vnet.ibm.com> <87mv5blki7.fsf@xmission.com> <1506859691.5691.211.camel@linux.vnet.ibm.com> <20171001223402.GG15067@dastard> <1506901362.5691.247.camel@linux.vnet.ibm.com> <87zi9ai63l.fsf@xmission.com> 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-MML: disable x-cbid: 17100212-0012-0000-0000-0000025F23FC X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17100212-0013-0000-0000-0000077DCCEF Message-Id: <1506947109.5691.282.camel@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-10-02_03:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1710020180 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 2017-10-01 at 22:25 -0500, Eric W. Biederman wrote: > Mimi Zohar writes: > > There should be no open writers in ima_check_last_writer(), so the > > file shouldn't be changing. > > This is slightly tangential but I think important to consider. > What do you do about distributed filesystems fuse, nfs, etc that > can change the data behind the kernels back. Exactly! > Do you not support such systems or do you have a sufficient way to > detect changes? Currently, only the initial file access in policy is measured, verified, audited.  Even if there was a way of detecting the change, since we can't trust these file systems, the performance would be awful, but we should probably not be caching the measurement/verification results. Mimi