Skip to content

RFC pidfs: support bind-mounts

Christian Brauner linux-fsdevel 1 version New

Get series with b4
b4 am [email protected] change-id 20241219-work-pidfs-mount-930f9899a1cd

Versions newest first

  1. v1 RFC Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2pidfs: allow bind-mountsfs/namespace.c fs/pidfs.c include/linux/pidfs.h+10 -30 replies
2/2selftests: add pidfd bind-mount teststools/testing/selftests/pidfd/.gitignore tools/testing/selftests/pidfd/Makefile tools/testing/selftests/pidfd/pidfd_bind_mount.c+190 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH RFC 0/2] pidfs: support bind-mounts

Allow bind-mounting pidfds. Similar to nsfs let's allow bind-mounts for pidfds. This allows pidfds to be safely recovered and checked for process recycling.

Instead of checking d_ops for both nsfs and pidfs we could in a follow-up patch add a flag argument to struct dentry_operations that functions similar to file_operations->fop_flags.

---
Christian Brauner (2):
pidfs: allow bind-mounts
selftests: add pidfd bind-mount tests

 fs/namespace.c                                   |  10 +-
 fs/pidfs.c                                       |   2 +-
 include/linux/pidfs.h                            |   1 +
 tools/testing/selftests/pidfd/.gitignore         |   1 +
 tools/testing/selftests/pidfd/Makefile           |   2 +-
 tools/testing/selftests/pidfd/pidfd_bind_mount.c | 188 +++++++++++++++++++++++
 6 files changed, 200 insertions(+), 4 deletions(-)

---
base-commit: 16ecd47cb0cd895c7c2f5dd5db50f6c005c51639
change-id: 20241219-work-pidfs-mount-930f9899a1cd