From: Florian Weimer <fweimer@redhat.com>
To: Andrew Haley via Libffi-discuss <libffi-discuss@sourceware.org>
Subject: Re: is fork() supported?
Date: Thu, 05 Aug 2021 10:27:15 +0200 [thread overview]
Message-ID: <87tuk447q4.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <a03e5f81-076b-454f-bcb6-b3d9d17ce390@redhat.com> (Andrew Haley via Libffi-discuss's message of "Thu, 5 Aug 2021 09:17:54 +0100")
* Andrew Haley via Libffi-discuss:
> On 8/4/21 9:00 PM, DJ Delorie via Libffi-discuss wrote:
>> I don't mean fork/exec (duh) but a fork() and keep going...
>>
>> Consider a case where a process is using a file-backed mapping for
>> closures; a fork() doesn't isolate that backing between parent/child
>> so there's a chance (for example) the parent could deallocate a
>> closure that the child needs, etc...
>>
>> I see four options...
>>
>> 1. Not supported. Sorry.
>>
>> 2. Supported only if you have fork-able closure backings (mmap or
>> maybe ktmpfile, but not file-backed) but this means documenting
>> that (at least) selinux settings might affect this. Caveat
>> Programmer.
>>
>> 3. Some API that says "I need this" so it can fail in a more useful
>> way than "segfault".
>>
>> 4. Fully supported, and we have some work to do to handle fork events.
>
> The bug that will never die.
>
> https://bugzilla.redhat.com/show_bug.cgi?id=1249685
> https://bugzilla.redhat.com/show_bug.cgi?id=531233
> https://bugzilla.redhat.com/show_bug.cgi?id=772657
Well, there are two ways to fix it: Avoid the need for alias mappings by
switching to static trampolines, or create new alias mappings upon fork.
(A third option would be kernel support for private alias mappings. A
fourth, get some form of explicit JIT support for SELinux.)
Thanks,
Florian
next prev parent reply other threads:[~2021-08-05 8:27 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-04 20:00 DJ Delorie
2021-08-05 8:17 ` Andrew Haley
2021-08-05 8:27 ` Florian Weimer [this message]
2021-08-24 18:15 ` DJ Delorie
2021-08-24 18:27 ` Jay K
2021-08-24 18:45 ` DJ Delorie
2021-08-24 21:12 ` Kaz Kylheku (libffi)
2021-08-24 21:58 ` Jay K
2021-08-25 9:27 ` Andrew Haley
2021-08-25 15:58 ` Jay K
2021-08-25 16:59 ` Kaz Kylheku (libffi)
2021-08-25 21:17 ` Andrew Haley
2021-08-05 18:13 ` DJ Delorie
2021-08-05 21:21 ` Jay K
2021-08-06 8:32 ` Andrew Haley
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=87tuk447q4.fsf@oldenburg.str.redhat.com \
--to=fweimer@redhat.com \
--cc=libffi-discuss@sourceware.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 read-only IMAP folder(s) and NNTP newsgroup(s).