lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 21 May 2020 22:28:39 -0500
From: (Eric W. Biederman)
To:     Rob Landley <>
        Linus Torvalds <>,
        Oleg Nesterov <>, Jann Horn <>,
        Kees Cook <>,
        Greg Ungerer <>,
        Bernd Edlinger <>,, Al Viro <>,
        Alexey Dobriyan <>,
        Andrew Morton <>,
        Casey Schaufler <>,,
        James Morris <>,
        "Serge E. Hallyn" <>,
        Andy Lutomirski <>
Subject: Re: [PATCH v2 7/8] exec: Generic execfd support

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, vfork(),
> have the child exec itself to unblock the parent, and then read the context data
> that just got discarded through the pipe from the parent. ("Wheee." And you can
> quote me on that.)

Do you have clone(CLONE_VM) ?  If my quick skim of the kernel sources is
correct that should be the same as vfork except without causing the
parent to wait for you.  Which I think would remove the need to reexec

>> The file descriptor is stored in mm->exe_file.
>> Probably the most straight forward implementation is to allow
>> execveat(AT_EXE_FILE, ...).
> Cool, that works.
>> You can look at binfmt_misc for how to reopen an open file descriptor.
> Added to the todo heap.

Yes I don't think it would be a lot of code.

I think you might be better served with clone(CLONE_VM) as it doesn't
block so you don't need to feed yourself your context over a pipe.


Powered by blists - more mailing lists