Re: [PATCH v2 7/8] exec: Generic execfd support

2020-05-22 Thread Eric W. Biederman
Rob Landley writes: > On 5/21/20 10:28 PM, Eric W. Biederman wrote: >> >> Rob Landley writes: >> >>> On 5/20/20 11:05 AM, Eric W. Biederman wrote: >> The file descriptor is stored in mm->exe_file. Probably the most straight forward implementation is to allow execveat(AT_EXE_FIL

Re: [PATCH v2 7/8] exec: Generic execfd support

2020-05-21 Thread Rob Landley
On 5/21/20 10:28 PM, Eric W. Biederman wrote: > > Rob Landley writes: > >> On 5/20/20 11:05 AM, Eric W. Biederman wrote: > >> Toybox would _like_ proc mounted, but can't assume it. I'm writing a new >> bash-compatible shell with nommu support, which means in order to do subshell >> and backgrou

Re: [PATCH v2 7/8] exec: Generic execfd support

2020-05-21 Thread Eric W. Biederman
Rob Landley writes: > On 5/20/20 11:05 AM, Eric W. Biederman wrote: > Toybox would _like_ proc mounted, but can't assume it. I'm writing a new > bash-compatible shell with nommu support, which means in order to do subshell > and background tasks if (!CONFIG_FORK) I need to create a pipe pair,

Re: [PATCH v2 7/8] exec: Generic execfd support

2020-05-21 Thread Rob Landley
On 5/20/20 11:05 AM, Eric W. Biederman wrote: > Rob Landley writes: > >> On 5/18/20 7:33 PM, Eric W. Biederman wrote: >>> >>> Most of the support for passing the file descriptor of an executable >>> to an interpreter already lives in the generic code and in binfmt_elf. >>> Rework the fields in bi

Re: [PATCH v2 7/8] exec: Generic execfd support

2020-05-20 Thread Eric W. Biederman
Rob Landley writes: > On 5/18/20 7:33 PM, Eric W. Biederman wrote: >> >> Most of the support for passing the file descriptor of an executable >> to an interpreter already lives in the generic code and in binfmt_elf. >> Rework the fields in binfmt_elf that deal with executable file >> descriptor

Re: [PATCH v2 7/8] exec: Generic execfd support

2020-05-19 Thread Rob Landley
On 5/18/20 7:33 PM, Eric W. Biederman wrote: > > Most of the support for passing the file descriptor of an executable > to an interpreter already lives in the generic code and in binfmt_elf. > Rework the fields in binfmt_elf that deal with executable file > descriptor passing to make executable fi

Re: [PATCH v2 7/8] exec: Generic execfd support

2020-05-19 Thread Eric W. Biederman
Linus Torvalds writes: > On Tue, May 19, 2020 at 12:46 PM Kees Cook wrote: >> >> Though frankly, I wonder if interp_flags could just be removed in favor >> of two new bit members, especially since interp_data is gone: > > Yeah, I think that might be a good cleanup - but please keep it as a > sep

Re: [PATCH v2 7/8] exec: Generic execfd support

2020-05-19 Thread Linus Torvalds
On Tue, May 19, 2020 at 12:46 PM Kees Cook wrote: > > Though frankly, I wonder if interp_flags could just be removed in favor > of two new bit members, especially since interp_data is gone: Yeah, I think that might be a good cleanup - but please keep it as a separate thing at the end of the serie

Re: [PATCH v2 7/8] exec: Generic execfd support

2020-05-19 Thread Kees Cook
On Mon, May 18, 2020 at 07:33:46PM -0500, Eric W. Biederman wrote: > > Most of the support for passing the file descriptor of an executable > to an interpreter already lives in the generic code and in binfmt_elf. > Rework the fields in binfmt_elf that deal with executable file > descriptor passing

[PATCH v2 7/8] exec: Generic execfd support

2020-05-18 Thread Eric W. Biederman
Most of the support for passing the file descriptor of an executable to an interpreter already lives in the generic code and in binfmt_elf. Rework the fields in binfmt_elf that deal with executable file descriptor passing to make executable file descriptor passing a first class concept. Move the