Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755520Ab0BAQWt (ORCPT ); Mon, 1 Feb 2010 11:22:49 -0500 Received: from mail-bw0-f223.google.com ([209.85.218.223]:34707 "EHLO mail-bw0-f223.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753157Ab0BAQWr convert rfc822-to-8bit (ORCPT ); Mon, 1 Feb 2010 11:22:47 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=f+7iX1afqkyl8JE9dVLxLoKHSv1Mp7VcVtTvP8fGrWLevd4zFKMaQxtvE658tmkA+x MGH/9pVa3wAN4KjWuJE4aPSHncBj0TU8Y5TC4bnqr/99qDQUK7/2ebAZj30FAxixCPHA inGASM8cnd79hpq7fbeVWYJ1KWVWRutsVAyQY= MIME-Version: 1.0 In-Reply-To: <201002011209.13540.rusty@rustcorp.com.au> References: <817ecb6f1001311522q52bf4eebmb748c486dcd5ad35@mail.gmail.com> <201002011209.13540.rusty@rustcorp.com.au> Date: Mon, 1 Feb 2010 11:22:45 -0500 Message-ID: <817ecb6f1002010822j769ccda6wfc39c0dbd42420cd@mail.gmail.com> Subject: Re: [PATCH v8] RO/NX protection for loadable kernel modules From: Siarhei Liakh To: Rusty Russell Cc: linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org, linux-next@vger.kernel.org, Arjan van de Ven , James Morris , Andrew Morton , Andi Kleen , Thomas Gleixner , "H. Peter Anvin" , Ingo Molnar , Stephen Rothwell , Dave Jones 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: 1003 Lines: 29 > Needs more brackets around arguments, otherwise someone calling it with > a complex expression will get very upset. [...] Done. > The core_text_size test should be enough here. Done. >> + ? ? ? ? ? ? ? ? ? ? begin_pfn = PFN_DOWN((unsigned long)mod->module_core); >> + ? ? ? ? ? ? ? ? ? ? end_pfn = PFN_DOWN((unsigned long)mod->module_core + >> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? mod->core_text_size); >> + ? ? ? ? ? ? ? ? ? ? if (end_pfn > begin_pfn) >> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? set_memory_rw(begin_pfn << PAGE_SHIFT, >> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? end_pfn - begin_pfn); > > Much of this code might be neater if you created a helper: Done. > But these are minor: patch looks good! Thanks for your feedback! -- 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/