Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753646AbdIHEtZ (ORCPT ); Fri, 8 Sep 2017 00:49:25 -0400 Received: from namei.org ([65.99.196.166]:58822 "EHLO namei.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751166AbdIHEtY (ORCPT ); Fri, 8 Sep 2017 00:49:24 -0400 Date: Fri, 8 Sep 2017 14:48:51 +1000 (AEST) From: James Morris To: Linus Torvalds cc: Linux Kernel Mailing List , LSM List , Mimi Zohar , Christoph Hellwig Subject: Re: [GIT PULL] Security subsystem updates for 4.14 In-Reply-To: Message-ID: References: User-Agent: Alpine 2.21 (LRH 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1073 Lines: 33 On Thu, 7 Sep 2017, Linus Torvalds wrote: > On Mon, Sep 4, 2017 at 3:29 AM, James Morris wrote: > > > > IMA: > > - A new integrity_read file operation method, avoids races when > > calculating file hashes > > Honestly, this seems really odd. > > It documents that it needs to be called with i_rwsem held exclusively, > and even has a lockdep assert to that effect (well, not really: the > code claims "exclusive", but the lockdep assert does not), but I'm not > actually seeing anybody doing it. > > Quite the reverse, I just see integrity_read_file() doing filp_open() > on the pathname and passing it to integrity_kernel_read() with no > locking. > > It really looks like just pure garbage to me. I pulled, and I'm not > unpulling the whole thing. I don't think it's been tested, and I don't > think it can be right. > > Tell me why I'm wrong, or tell me why that garbage made it in in the > first place? Mimi and Christoph worked together on this over several iterations -- I'll let them respond. -- James Morris