is fork() supported?
DJ Delorie
dj@redhat.com
Tue Aug 24 18:45:42 GMT 2021
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?
More information about the Libffi-discuss
mailing list