selftests/filesystems: test completing a context from another user namespacefsopen() records the caller's user namespace in fc->user_ns and handsback an ordinary file descriptor, so the task that
selftests/filesystems: test completing a context from another user namespacefsopen() records the caller's user namespace in fc->user_ns and handsback an ordinary file descriptor, so the task that issuesFSCONFIG_CMD_CREATE need not be the one that created the context.mount_capable() authorizes that for a caller holding CAP_SYS_ADMIN in anancestor of fc->user_ns, which any unprivileged user has over a usernamespace it just created.binfmt_misc and overlayfs used to WARN_ON() the mismatch. Add a test forboth. Also cover the handover within one user namespace. That is asupported thing to do and has to keep working.Link: https://patch.msgid.link/20260802-work-fill_super-warn-v1-3-4e987911a39a@kernel.orgSigned-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
show more ...