lkml.org 
[lkml]   [2020]   [May]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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@chromium.org>

--
Kees Cook

\
 
 \ /
  Last update: 2020-05-08 07:52    [W:0.257 / U:0.712 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site