From: Robert Mustacchi <rm@fingolfin.org>
To: illumos-developer <developer@lists.illumos.org>,
Cedric Blancher <cedric.blancher@gmail.com>
Subject: Re: [developer] Review - 5798 fexecve() needed per POSIX 2008
Date: Fri, 12 Jan 2024 16:55:42 -0800 [thread overview]
Message-ID: <4291ab64-1b67-4f60-925a-95526645047d@fingolfin.org> (raw)
In-Reply-To: <CALXu0UcOczMHKjri_ObgFA0FSg201ty5iScDWd_9tyfF0jZ0-w@mail.gmail.com>
On 1/12/24 16:45, Cedric Blancher wrote:
> On Fri, 12 Jan 2024 at 15:06, Andy Fiddaman <illumos@fiddaman.net> wrote:
>>
>> Hello,
>>
>> I have a project coming up that would benefit from fexecve(2), and this
>> function is also part of POSIX 2008 so it .
>>
>> I've taken Garrett's work in
>> http://cr.illumos.org/~webrev/gdamore/fexecve/
>> and put it up for review. It takes an approach of using a consed up
>> /dev/fd path versus introducing a new system call such as execveat()
>> in order to reduce risk and knock on impact to auditing etc. This seems
>> like a reasonable trade off to me but I'm interested in views from others.
>
> Unfortunately this is not going to work. The whole point of fexecve()
> is to make tools like shells more efficient, but relying on /dev/fd
> means that your shell will no longer work at boot time, or in a
> chroot, when /dev/fd is not available/mounted yet.
There is a bit more nuance here in the implementation. It does not rely
on /dev/fd being mounted or present in a chroot (though that is its own
question given what's happening in the kernel implementation). So all
the cases you want to work should if you actually look at the
implementation.
Robert
next prev parent reply other threads:[~2024-01-13 0:55 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-12 14:06 Andy Fiddaman
2024-01-13 0:45 ` [developer] " Cedric Blancher
2024-01-13 0:55 ` Robert Mustacchi [this message]
2024-01-13 0:57 ` Bill Sommerfeld
2024-01-13 1:52 ` Cedric Blancher
2024-01-13 3:49 ` Bill Sommerfeld
2024-01-13 12:22 ` Andy Fiddaman
2024-01-13 17:03 ` Alan Coopersmith
2024-01-13 21:26 ` Jason King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4291ab64-1b67-4f60-925a-95526645047d@fingolfin.org \
--to=rm@fingolfin.org \
--cc=cedric.blancher@gmail.com \
--cc=developer@lists.illumos.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).