Re: [PATCH] ramfs: nommu: fix error rollback and reader races in ramfs_nommu_expand_for_mapping()
From: Daniel Palmer
Date: Mon Jul 13 2026 - 19:37:06 EST
Hi Hajime,
On Tue, 14 Jul 2026 at 04:49, Hajime Tazaki <thehajime@xxxxxxxxx> wrote:
> so I was wondering if it is still interesting to support the syscall
> (memfd_createfd) on nommu even the fcntl always fails.
I think these fcntls will also fail on MMU=y where the full tmpfs is
not enabled for size reasons. I'm not sure if it's actually possible
to detect if tmpfs is really tmpfs or not. (I have this exact issue
with a test for nolibc).
memfd_createfd is still useful because it basically allows you to
create anonymous temporary files that you can pass to another process
and mmap() in both.
I use this for doing DNS resolution in my nolibc system: A process
that needs DNS resolution creates an memfd for the result and then
forks the resolver which mmap()s the memfd, fills in the result and
then exits. This avoids having the big resolver code in everything
that needs it since I don't have any shared libraries :).
BTW: Could you share a link to your LTP fork? I will add it to my m68k
environment.
Thanks,
Daniel