Re: [RFC PATCH 0/6] um: introduce pidfd_mmap()/pidfd_munmap() syscalls
From: Johannes Berg
Date: Tue Jul 21 2026 - 07:25:10 EST
On Fri, 2026-07-10 at 13:53 -0700, Cong Wang wrote:
> This RFC adds two syscalls, pidfd_mmap() and pidfd_munmap(), that let a
> supervisor install or remove a mapping in another process's address space
> without target-side cooperation, and converts User Mode Linux to use them.
Seems simple enough, but I can't really comment on it.
> As this is an RFC, the UML side _intentionally_ does not handle host
> portability: it assumes a host kernel that provides pidfd_mmap() and
> deliberately omits any detection or fallback for older hosts (which would
> otherwise pick the ptrace path, or fail the seccomp probe). That belongs
> in a non-RFC version and is left out here to keep the series focused on
> demonstrating the impact on UML.
Makes sense for the RFC, but I think the fallback to seccomp as-is might
be useful still, we did see some benefit of seccomp and cannot
necessarily update the host kernels _that_ quickly. Maybe do that only
if forced by the user with seccomp=insecure or something, not pick it
with =auto and fail with seccomp=on if it's not available? That'd be
good enough for us, and not really leave a potential security trap (that
we have now for people who don't read the docs ;) ).
johannes