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. Signed-off-by: Christian Brauner <brauner@xxxxxxxxxx> --- 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