From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933021Ab1JXQ2r (ORCPT ); Mon, 24 Oct 2011 12:28:47 -0400 Received: from toast.topped-with-meat.com ([204.197.218.159]:33472 "EHLO topped-with-meat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932934Ab1JXQ2p (ORCPT ); Mon, 24 Oct 2011 12:28:45 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit From: Roland McGrath To: Eric Paris X-Fcc: ~/Mail/lkml Cc: Linus Torvalds , Andrew Morton , James Morris , Stephen Smalley , selinux@tycho.nsa.gov, John Johansen , linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] LSM: Do not apply mmap_min_addr check to PROT_NONE mappings In-Reply-To: Eric Paris's message of Monday, 24 October 2011 11:07:48 -0400 <1319468868.3280.9.camel@localhost> References: <20111021213916.914462C0A5@topped-with-meat.com> <20111022172450.0BCCE2C0A9@topped-with-meat.com> <20111023185243.EFE2F2C08F@topped-with-meat.com> <1319468868.3280.9.camel@localhost> Emacs: the road to Hell is paved with extensibility. Message-Id: <20111024162842.CE1942C09C@topped-with-meat.com> Date: Mon, 24 Oct 2011 09:28:42 -0700 (PDT) X-CMAE-Score: 0 X-CMAE-Analysis: v=2.0 cv=fe7WOzsF c=1 sm=1 a=27hm96M904wA:10 a=kj9zAlcOel0A:10 a=YM7LnJMpTPLdd74ak4EA:9 a=CjuIK1q_8ugA:10 a=WkljmVdYkabdwxfqvArNOQ==:117 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > I feel like, and it's just a very vague feeling, that the PROT bits > didn't matter to the kernel. It would still happily execute stuff on > page 0 even without PROT_EXEC at some point in the past. I'm probably > totally off base, and I could test it, but I sort of feel like I > remember something like that.... Saying that PROT_EXEC might not be enforced is quite a different thing than saying "PROT bits don't matter". It's certainly the case that in some past kernel versions, some hardware (older x86 chips), some configurations (x86 non-PAE), and some modes (READ_IMPLIES_EXEC personality stuff), what you can read, you can execute. I sincerely doubt it's ever been the case that anything mapped as PROT_NONE could be accessed in any manner. Thanks, Roland