Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755758Ab2E3VEv (ORCPT ); Wed, 30 May 2012 17:04:51 -0400 Received: from mail-wi0-f172.google.com ([209.85.212.172]:42449 "EHLO mail-wi0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753787Ab2E3VEt convert rfc822-to-8bit (ORCPT ); Wed, 30 May 2012 17:04:49 -0400 MIME-Version: 1.0 In-Reply-To: <20120530205612.GY11775@ZenIV.linux.org.uk> References: <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> <20120530205612.GY11775@ZenIV.linux.org.uk> From: Linus Torvalds Date: Wed, 30 May 2012 14:04:23 -0700 X-Google-Sender-Auth: frfOnQzAFpjmOFvsihDlo0vgWGg 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 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1179 Lines: 27 On Wed, May 30, 2012 at 1:56 PM, Al Viro wrote: >> >> 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". > > If only it would be trivial ;-/ ?Take a look at !MMU case (or at the > description in the posting upthread if you want to avoid seeing your > breakfast one more time - the code in validate_mmap_request() is > really ugly). Don't bother with validate_mmap_request() for nommu. It's ugly, but it does the same thing, and if it does something else, it's buggy anyway. Generating 'prot' from 'reqprot' really *should* be as simple as what I did in my patch. The fact that some places f*ck it up is their problem - see for example mprotect (I think) that didn't take MNT_NOEXEC into account. Don't try to emulate those broken semantics. Just fix them. 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/