Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754693AbZGLPbU (ORCPT ); Sun, 12 Jul 2009 11:31:20 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754334AbZGLPbJ (ORCPT ); Sun, 12 Jul 2009 11:31:09 -0400 Received: from casper.infradead.org ([85.118.1.10]:51309 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754099AbZGLPbI (ORCPT ); Sun, 12 Jul 2009 11:31:08 -0400 Date: Sun, 12 Jul 2009 08:32:27 -0700 From: Arjan van de Ven To: Rusty Russell Cc: Ingo Molnar , Siarhei Liakh , linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org, James Morris , Andrew Morton , Andi Kleen , Thomas Gleixner , "H. Peter Anvin" , linux-cris-kernel@axis.com Subject: Re: [PATCH v5] RO/NX protection for loadable kernel modules Message-ID: <20090712083227.39939849@infradead.org> In-Reply-To: <200907121928.28887.rusty@rustcorp.com.au> References: <817ecb6f0907081610p6d60341cudbee42685eac1347@mail.gmail.com> <200907121410.39874.rusty@rustcorp.com.au> <20090712004524.2f0c4e57@infradead.org> <200907121928.28887.rusty@rustcorp.com.au> Organization: Intel X-Mailer: Claws Mail 3.7.1 (GTK+ 2.14.7; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1429 Lines: 36 On Sun, 12 Jul 2009 19:28:27 +0930 Rusty Russell wrote: > On Sun, 12 Jul 2009 05:15:24 pm Arjan van de Ven wrote: > > Rusty Russell wrote: > > > (I like the idea of trying kmalloc and falling back, simply > > > because it reduces TLB pressure, but that's probably best done > > > after unification). > > > > or using a non-power-of-two get_free_pages() thing... > > > > some architectures will need to know that memory needs to be > > executable at allocation time so that it can be put in an > > executable address range etc... > > Yes, maybe that's better than kmalloc. On my laptop I have 105 > modules loaded, with 3778464 total length: I'm wasting 206944 bytes > on unused tails of pages. But that's only 0.06% of my memory. > 105 is also a sign that you picked a somewhat suboptimal config... that's of course your choice but it's a choice that has a small price, if you don't want to pay that price, changing the config to not be entirely insane is a good answer as well ;-) -- Arjan van de Ven Intel Open Source Technology Centre For development, discussion and tips for power savings, visit http://www.lesswatts.org -- 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/