lkml.org 
[lkml]   [2017]   [Jul]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCH] exec: Use init rlimits for setuid exec
On Mon 10-07-17 18:27:51, Michal Hocko wrote:
> On Mon 10-07-17 09:12:11, Kees Cook wrote:
[...]
> > >> do_execveat_common() ->
> > >> exec_binprm() ->
> > >> search_binary_handler() ->
> > >> fmt->load_binary (load_elf_binary()) ->
> > >> setup_new_exec() ->
> > >> arch_pick_mmap_layout() ->
> > >> mmap_is_legacy() ->
> > >> rlimit(RLIMIT_STACK) == RLIM_INFINITY
> > >
> > > FWIW this is gone in tip tree. See
> > > lkml.kernel.org/r/20170614082218.12450-1-mhocko@kernel.org
> >
> > Sounds good to me, but won't large-memory users in 32-bit get annoyed?
>
> Why would they? 32b do bottom up layouts by default.

OK, I misread the code. 32b applications on 64b systems do top down by
default and only if they override this by ADDR_COMPAT_LAYOUT
personality. For some reason I thought that 32b userspace goes a
different path and makes sure that they are always doing bottom up.

Anyway even if somebody really needs to grow stack really large we have
the personality to give them the legacy layout.
--
Michal Hocko
SUSE Labs

\
 
 \ /
  Last update: 2017-07-10 20:17    [W:0.090 / U:8.256 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site