Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752719AbbKZAPz (ORCPT ); Wed, 25 Nov 2015 19:15:55 -0500 Received: from r00tworld.com ([212.85.137.150]:52279 "EHLO r00tworld.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751378AbbKZAPx (ORCPT ); Wed, 25 Nov 2015 19:15:53 -0500 From: "PaX Team" To: linux-kernel@vger.kernel.org, Kees Cook Date: Thu, 26 Nov 2015 01:15:11 +0100 MIME-Version: 1.0 Subject: Re: [PATCH v2 2/4] introduce post-init read-only memory Reply-to: pageexec@freemail.hu CC: Kees Cook , Andy Lutomirski , "H. Peter Anvin" , Michael Ellerman , Mathias Krause , Ingo Molnar , Thomas Gleixner , x86@kernel.org, Arnd Bergmann , Emese Revfy , kernel-hardening@lists.openwall.com, linux-arch Message-ID: <56564F0F.3158.108D0B78@pageexec.freemail.hu> In-reply-to: <1448494286-16029-3-git-send-email-keescook@chromium.org> References: <1448494286-16029-1-git-send-email-keescook@chromium.org>, <1448494286-16029-3-git-send-email-keescook@chromium.org> X-mailer: Pegasus Mail for Windows (4.70) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.12 (r00tworld.com [212.85.137.150]); Thu, 26 Nov 2015 01:15:03 +0100 (CET) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1236 Lines: 32 On 25 Nov 2015 at 15:31, Kees Cook wrote: > diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h > index c4bd0e2c173c..772c784ba763 100644 > --- a/include/asm-generic/vmlinux.lds.h > +++ b/include/asm-generic/vmlinux.lds.h > @@ -256,6 +256,7 @@ > .rodata : AT(ADDR(.rodata) - LOAD_OFFSET) { \ > VMLINUX_SYMBOL(__start_rodata) = .; \ > *(.rodata) *(.rodata.*) \ > + *(.data..ro_after_init) /* Read only after init */ \ ^^^^^^^^^^^ looks like it's tabs vs. spaces... > +/* > + * __read_only is used to mark things that are read-only after init (i.e. ^^^^^^^^^^^ i know you liked the old name but probably this one needs to change too :P > + * after mark_rodata_ro() has been called). These are effectively read-only, > + * but may get written to during init, so can't live in .rodata (via "const"). > + */ > +#ifndef __ro_after_init > +#define __ro_after_init __attribute__((__section__(".data..ro_after_init"))) > +#endif -- 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/