selftests/filesystems: check that OPEN_TREE_NAMESPACE keeps mounts covered

Add a test for open_tree(OPEN_TREE_NAMESPACE) from a user namespace that
doesn't own the mount namespace it copies from:

- a file covered by a private or an unbindable tmpfs mount
- the non-recursive copy of the parent mount fails with EINVAL
- the recursive copy keeps the file covered in the new mount namespace
- the owner of the mount namespace keeps the bind mount semantics

Link: https://patch.msgid.link/20260930-work-mount-fixes-3-v1-7-be34c83956ae@kernel.org
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
This commit is contained in:
Christian Brauner 2026-09-30 15:31:59 +02:00
commit fe187cbb48
No known key found for this signature in database
GPG key ID: 91C61BC06578DCA2
3 changed files with 197 additions and 1 deletions