linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] User namespace aware fanotify
@ 2025-04-19 10:06 Amir Goldstein
  2025-04-19 10:06 ` [PATCH v2 1/2] fanotify: remove redundant permission checks Amir Goldstein
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Amir Goldstein @ 2025-04-19 10:06 UTC (permalink / raw)
  To: Jan Kara; +Cc: Miklos Szeredi, Christian Brauner, linux-fsdevel

Jan,

This v2 is following a two years leap from the RFC path [1].
the code is based on the mntns fix patches I posted and is available
on my github [2].

Since then, Christian added support for open_by_handle_at(2)
to admin inside userns, which makes watching FS_USERNS_MOUNT
sb more useful.

And this should also be useful for Miklos' mntns mount tree watch
inside userns.

Tested sb/mount watches inside userns manually with fsnotifywatch -S
and -M with some changes to inotify-tools [3].

Ran mount-notify test manually inside userns and saw that it works
after this change.

I was going to write a variant of mount-notify selftest that clones
also a userns, but did not get to it.

Christian, Miklos,

If you guys have interest and time in this work, it would be nice if
you can help with this test variant or give me some pointers.

I can work on the test and address review comments when I get back from
vacation around rc5 time, but wanted to get this out soon for review.

Thanks,
Amir.

changes since v1:
- Split cleanup patch (Jan)
- Logic simplified a bit
- Add support for mntns marks inside userns

[1] https://lore.kernel.org/linux-fsdevel/20230416060722.1912831-1-amir73il@gmail.com/
[2] https://github.com/amir73il/linux/commits/fanotify_userns/
[3] https://github.com/amir73il/inotify-tools/commits/fanotify_userns/

Amir Goldstein (2):
  fanotify: remove redundant permission checks
  fanotify: support watching filesystems and mounts inside userns

 fs/notify/fanotify/fanotify.c      |  1 +
 fs/notify/fanotify/fanotify_user.c | 47 ++++++++++++++++++------------
 include/linux/fanotify.h           |  5 ++--
 include/linux/fsnotify_backend.h   |  1 +
 4 files changed, 32 insertions(+), 22 deletions(-)

-- 
2.34.1


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

end of thread, other threads:[~2025-05-19 10:46 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-19 10:06 [PATCH v2 0/2] User namespace aware fanotify Amir Goldstein
2025-04-19 10:06 ` [PATCH v2 1/2] fanotify: remove redundant permission checks Amir Goldstein
2025-04-19 10:06 ` [PATCH v2 2/2] fanotify: support watching filesystems and mounts inside userns Amir Goldstein
2025-05-14 15:49   ` Jan Kara
2025-05-14 18:39     ` Amir Goldstein
2025-05-16 17:28       ` Amir Goldstein
2025-05-16 18:52         ` Amir Goldstein
2025-05-16 13:22   ` Miklos Szeredi
2025-05-16 15:32     ` Amir Goldstein
2025-05-19 10:03   ` Christian Brauner
2025-05-19 10:46     ` Amir Goldstein
2025-04-19 11:48 ` [PATCH v2 0/2] User namespace aware fanotify Amir Goldstein
2025-05-08 20:46   ` Amir Goldstein
2025-05-14  9:00     ` Amir Goldstein

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).