Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAGXu5j+avp7VAEAhRCH2fyQdqJo_yM2xkwxVbcO0eXeSscNNLA@mail.gmail.com>
Date: Wed, 10 May 2017 11:20:47 -0700
From: Kees Cook <keescook@...omium.org>
To: Daniel Micay <danielmicay@...il.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>, Linux-MM <linux-mm@...ck.org>, 
	"kernel-hardening@...ts.openwall.com" <kernel-hardening@...ts.openwall.com>, LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] mark protection_map as __ro_after_init

On Wed, May 10, 2017 at 10:44 AM, Daniel Micay <danielmicay@...il.com> wrote:
> The protection map is only modified by per-arch init code so it can be
> protected from writes after the init code runs.
>
> This change was extracted from PaX where it's part of KERNEXEC.
>
> Signed-off-by: Daniel Micay <danielmicay@...il.com>

Thanks!

Acked-by: Kees Cook <keescook@...omium.org>

-Kees

> ---
>  mm/mmap.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/mmap.c b/mm/mmap.c
> index f82741e199c0..3bd5ecd20d4d 100644
> --- a/mm/mmap.c
> +++ b/mm/mmap.c
> @@ -94,7 +94,7 @@ static void unmap_region(struct mm_struct *mm,
>   *                                                             w: (no) no
>   *                                                             x: (yes) yes
>   */
> -pgprot_t protection_map[16] = {
> +pgprot_t protection_map[16] __ro_after_init = {
>         __P000, __P001, __P010, __P011, __P100, __P101, __P110, __P111,
>         __S000, __S001, __S010, __S011, __S100, __S101, __S110, __S111
>  };
> --
> 2.12.2
>



-- 
Kees Cook
Pixel Security

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.