public inbox for libffi-discuss@sourceware.org
 help / color / mirror / Atom feed
From: DJ Delorie <dj@redhat.com>
To: Jay K <jayk123@hotmail.com>
Cc: libffi-discuss@sourceware.org
Subject: Re: is fork() supported?
Date: Tue, 24 Aug 2021 14:45:42 -0400	[thread overview]
Message-ID: <xnczq24r6x.fsf@greed.delorie.com> (raw)
In-Reply-To: <MWHPR1401MB1951130BC2E08E7A284F1238E6C59@MWHPR1401MB1951.namprd14.prod.outlook.com>

Jay K <jayk123@hotmail.com> writes:
> 1 Sorry, I assumed mail from DJ was about djgpp, and that context was
> lacking in libffi. My mistake.

Ha!  Yeah, not about djgpp, which I think "just works" ;-)

> 3 So libffi no longer has read/write/execute memory, or turns
> read/write into execute, correct?

The problem case is when libffi can't mmap a chunk of write+exec memory,
and resorts to writing to a file and mapping the file read+exec, which
happens in Linux with certain selinux security profiles.  Those mappings
get shared between a parent/child pair.

> 4 So the implied assertion or question then, does that work very much
> sweep away "all such problems", or some remain?

I think the trampfd static templates *should* solve the problem on
platforms that support mmap().

But, as I said, this is besides the point - the question is "is it
supported", not "is it possible".  Given we've added at least one
closure method that violates the fork() premise - was adding that method
a bug, or does it imply that it's not supported?


  reply	other threads:[~2021-08-24 18:45 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
2021-08-24 18:15     ` DJ Delorie
2021-08-24 18:27       ` Jay K
2021-08-24 18:45         ` DJ Delorie [this message]
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=xnczq24r6x.fsf@greed.delorie.com \
    --to=dj@redhat.com \
    --cc=jayk123@hotmail.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).