Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755921Ab2E3U2c (ORCPT ); Wed, 30 May 2012 16:28:32 -0400 Received: from mail-wg0-f44.google.com ([74.125.82.44]:54941 "EHLO mail-wg0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754297Ab2E3U2b (ORCPT ); Wed, 30 May 2012 16:28:31 -0400 MIME-Version: 1.0 In-Reply-To: <20120530202427.GW11775@ZenIV.linux.org.uk> References: <1337112446.20904.50.camel@falcor> <20120516004251.GO22082@ZenIV.linux.org.uk> <20120516021828.GP22082@ZenIV.linux.org.uk> <1337807899.15138.31.camel@falcor> <20120530043443.GA3200@ZenIV.linux.org.uk> <20120530163605.GV11775@ZenIV.linux.org.uk> <1338406967.2257.24.camel@localhost> <20120530202427.GW11775@ZenIV.linux.org.uk> From: Linus Torvalds Date: Wed, 30 May 2012 13:28:09 -0700 X-Google-Sender-Auth: -67fgSssUJ7LZIe6PnUV7ZAkW2E Message-ID: Subject: Re: [PATCH] vfs: fix IMA lockdep circular locking dependency To: Al Viro Cc: Eric Paris , Mimi Zohar , Mimi Zohar , linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1169 Lines: 26 On Wed, May 30, 2012 at 1:24 PM, Al Viro wrote: > On Wed, May 30, 2012 at 03:42:47PM -0400, Eric Paris wrote: >> security_file_mmap() would pretty much only be used in do_mmap_pgoff() >> (or validate_mmap_request) > > Callers, actually - the whole point is to lift it out of under ->mmap_sem. > The tricky part is reqprot vs. prot mess. See how I solved reqprot vs prot in my suggested original patch. You have it somewhere in your inbox, I know, because you called me out on the fact that my original email forgot to attach it ;) It actually cleaned things up, and made the calling conventions simpler. Just always pass in "reqprot", and have the security layer do the trivial "calculate final prot". Anyway, my original patch worked, but it (incorrectly) optimized away the call to the security layer if file was NULL. But that's just a matter of removing that check. Linus -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/