Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758259AbYBJJT5 (ORCPT ); Sun, 10 Feb 2008 04:19:57 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752761AbYBJJTl (ORCPT ); Sun, 10 Feb 2008 04:19:41 -0500 Received: from smtp-out01.alice-dsl.net ([88.44.60.11]:32191 "EHLO smtp-out01.alice-dsl.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752307AbYBJJTi (ORCPT ); Sun, 10 Feb 2008 04:19:38 -0500 To: Thomas Gleixner Cc: mingo@elte.hu, linux-kernel@vger.kernel.org Subject: Re: [PATCH] [3/5] CPA: Make advised protection check truly advisory References: <20080208536.837219990@suse.de> <20080208163614.DF4FC1B41AA@basil.firstfloor.org> <200802091756.06553.ak@suse.de> From: Andi Kleen Date: 10 Feb 2008 10:19:35 +0100 In-Reply-To: Message-ID: <87myq9i2xk.fsf@basil.nowhere.org> User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-OriginalArrivalTime: 10 Feb 2008 09:13:15.0000 (UTC) FILETIME=[2ABFC780:01C86BC5] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1780 Lines: 35 Thomas Gleixner writes: > 2) I care about RO as much as I care about the NX correctness. That's > the same logic and the same problem. If we have overlapping regions, > then we need to split large pages. Otherwise both protections are > useless to a certain degree. That's laudable of you if you care about that so deeply, but then please just fix try_preserve_large_page() to do that correctly. But I suspect you will need some sort of range check for this anyways so applying my patchkit as the foundation for your fix is probably not a bad idea. I hope we can agree on the simple fact that without ranges large pages cannot be handled correctly. > 3) For correctness reasons I even ponder to make the NX/RO mandatory. That might make sense for cpa, but is not a good idea for sharing these checks with init_memory_mapping() which was the main goal for my patchkit. I plan to do some further changes in that area, but that first requires sharing of that code. There you don't want to get into the mess of handling 4K pages for these boundaries because they are later split up anyways by cpa for the DEBUG_RODATA case. You've previously complained about other code reimplementing pageattr code and doing fine grained 4K splits in init_memory_mapping() would be exactly that so I assume you wouldn't like that either. That is why I only wanted to apply the required checks there, to leave the exact work for later. You have not previously commented on that aspect so I assume it's ok for you. -Andi -- 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/