linux-security-module.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/4] mount notification
@ 2025-01-23 19:41 Miklos Szeredi
  2025-01-23 19:41 ` [PATCH v4 1/4] fsnotify: add mount notification infrastructure Miklos Szeredi
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: Miklos Szeredi @ 2025-01-23 19:41 UTC (permalink / raw)
  To: linux-fsdevel
  Cc: Christian Brauner, Jan Kara, Amir Goldstein, Karel Zak,
	Lennart Poettering, Ian Kent, Al Viro, linux-security-module,
	Paul Moore

Addressed all comments, and split up patch into three pieces (fsnotify,
fanotify, namespace) and added a fourth patch for mount changes.

There's only one FIXME remaining in selinux_path_notify().  The path passed
to fanotify_mark() and subsequently to ->path_notify() is a namespace file,
and comes from nsfs (i.e. /proc/$$/ns/mnt).  Does this need to be handled
specially by selinux?

Paul, can you please review this change?

Thanks,
Miklos

---
v4:
  - add notification on attribute change
  - deal with two FIXMEs
  - move data and code to #ifdef CONFIG_FSNOTIFY regions
  - function renames for more consistentcy (Christian)
  - explanation comment in umount_tree() (Christian)
  - style cleanups in fanotify (Amir, Jan)
  - changed FAN_MNT_* values (Amir)

v3:
  - use a global list protected for temporarily storing (Christian)
  - move fsnotify_* calls to namespace_unlock() (Christian)
  - downgrade namespace_sem to read for fsnotify_* calls (Christian)
  - add notification for reparenting in propagate_umount (Christian)
  - require nsfs file (/proc/PID/ns/mnt) in fanotify_mark(2) (Christian)
  - cleaner check for fsnotify being initialized (Amir)
  - fix stub __fsnotify_mntns_delete (kernel test robot)
  - don't add FANOTIFY_MOUNT_EVENTS to FANOTIFY_FD_EVENTS (Amir)

v2:
  - notify for whole namespace as this seems to be what people prefer
  - move fsnotify() calls outside of mount_lock
  - only report mnt_id, not parent_id


Miklos Szeredi (4):
  fsnotify: add mount notification infrastructure
  fanotify: notify on mount attach and detach
  vfs: add notifications for mount attach and detach
  vfs: add notifications for mount attribute change

 fs/mount.h                         |  26 +++++++
 fs/namespace.c                     | 120 ++++++++++++++++++++++++++++-
 fs/notify/fanotify/fanotify.c      |  38 ++++++++-
 fs/notify/fanotify/fanotify.h      |  18 +++++
 fs/notify/fanotify/fanotify_user.c |  86 +++++++++++++++++----
 fs/notify/fdinfo.c                 |   5 ++
 fs/notify/fsnotify.c               |  47 +++++++++--
 fs/notify/fsnotify.h               |  11 +++
 fs/notify/mark.c                   |  14 +++-
 fs/pnode.c                         |   4 +-
 include/linux/fanotify.h           |  12 ++-
 include/linux/fsnotify.h           |  25 ++++++
 include/linux/fsnotify_backend.h   |  43 ++++++++++-
 include/uapi/linux/fanotify.h      |  11 +++
 security/selinux/hooks.c           |   4 +
 15 files changed, 428 insertions(+), 36 deletions(-)

-- 
2.47.1


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2025-01-28 18:11 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-23 19:41 [PATCH v4 0/4] mount notification Miklos Szeredi
2025-01-23 19:41 ` [PATCH v4 1/4] fsnotify: add mount notification infrastructure Miklos Szeredi
2025-01-23 19:41 ` [PATCH v4 2/4] fanotify: notify on mount attach and detach Miklos Szeredi
2025-01-24 19:38   ` Paul Moore
2025-01-25  1:09     ` Russell Coker
2025-01-28 12:42       ` Miklos Szeredi
2025-01-28 13:37         ` Miklos Szeredi
2025-01-28 18:11     ` Daniel Burgener
2025-01-23 19:41 ` [PATCH v4 3/4] vfs: add notifications for " Miklos Szeredi
2025-01-23 19:41 ` [PATCH v4 4/4] vfs: add notifications for mount attribute change Miklos Szeredi
2025-01-24  9:09   ` Amir Goldstein
2025-01-24 15:38   ` Christian Brauner
2025-01-24 15:49     ` Miklos Szeredi
2025-01-25  9:22       ` Christian Brauner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).