|
Message-ID: <56564F0F.3158.108D0B78@pageexec.freemail.hu> Date: Thu, 26 Nov 2015 01:15:11 +0100 From: "PaX Team" <pageexec@...email.hu> To: linux-kernel@...r.kernel.org, Kees Cook <keescook@...omium.org> CC: Kees Cook <keescook@...omium.org>, Andy Lutomirski <luto@...capital.net>, "H. Peter Anvin" <hpa@...or.com>, Michael Ellerman <mpe@...erman.id.au>, Mathias Krause <minipli@...glemail.com>, Ingo Molnar <mingo@...hat.com>, Thomas Gleixner <tglx@...utronix.de>, x86@...nel.org, Arnd Bergmann <arnd@...db.de>, Emese Revfy <re.emese@...il.com>, kernel-hardening@...ts.openwall.com, linux-arch <linux-arch@...r.kernel.org> Subject: Re: [PATCH v2 2/4] introduce post-init read-only memory 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
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.