[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202005072249.81159F29@keescook>
Date: Thu, 7 May 2020 22:50:53 -0700
From: Kees Cook <keescook@...omium.org>
To: "Eric W. Biederman" <ebiederm@...ssion.com>
Cc: linux-kernel@...r.kernel.org,
Linus Torvalds <torvalds@...ux-foundation.org>,
Oleg Nesterov <oleg@...hat.com>, Jann Horn <jannh@...gle.com>,
Greg Ungerer <gerg@...ux-m68k.org>,
Rob Landley <rob@...dley.net>,
Bernd Edlinger <bernd.edlinger@...mail.de>,
linux-fsdevel@...r.kernel.org, Al Viro <viro@...IV.linux.org.uk>,
Alexey Dobriyan <adobriyan@...il.com>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH 6/7] exec: Move most of setup_new_exec into flush_old_exec
On Thu, May 07, 2020 at 04:51:13PM -0500, Eric W. Biederman wrote:
> I intend to the following text to the changelog. At this point I
> believe I have read through everything and nothing raises any concerns
> for me:
>
> --- text begin ---
>
> To see why it is safe to move this code please note that effectively
> this change moves the personality setting in the binfmt and the following
> three lines of code after everything except unlocking the mutexes:
> arch_pick_mmap_layout
> arch_setup_new_exec
> mm->task_size = TASK_SIZE
>
> The function arch_pick_mmap_layout at most sets:
> mm->get_unmapped_area
> mm->mmap_base
> mm->mmap_legacy_base
> mm->mmap_compat_base
> mm->mmap_compat_legacy_base
> which nothing in flush_old_exec or setup_new_exec depends on.
>
> The function arch_setup_new_exec only sets architecture specific
> state and the rest of the functions only deal in state that applies
> to all architectures.
>
> The last line just sets mm->task_size and again nothing in flush_old_exec
> or setup_new_exec depend on task_size.
>
> --- text end ---
> [...]
> > So, with a bit larger changelog discussing what's moving "earlier",
> > I think this looks good:
>
> Please see above.
Awesome! Thanks for checking my checking of your checking. ;)
Acked-by: Kees Cook <keescook@...omium.org>
--
Kees Cook
Powered by blists - more mailing lists