Re: [RFC PATCH] fanotify: notify on mount attach and detach

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thank you for working on this.

On Thu, Nov 28, 2024 at 03:39:59PM GMT, Miklos Szeredi wrote:
> To monitor an entire mount namespace with this new interface, watches need
> to be added to all existing mounts.  This can be done by performing
> listmount()/statmount() recursively at startup and when a new mount is
> added.

It seems that maintaining a complete tree of nodes on large systems
with thousands of mountpoints is quite costly for userspace. It also
appears to be fragile, as any missed new node (due to a race or other
reason) would result in the loss of the ability to monitor that part
of the hierarchy. Let's imagine that there are new mount nodes added
between the listmount() and fanotify_mark() calls. These nodes
will be invisible.

It would be beneficial to have a "recursive" flag that would allow for
opening only one mount node and receiving notifications for the entire
hierarchy. (I have no knowledge about fanotify, so it is possible that
this may not be feasible due to the internal design of fanotify.)

    Karel

-- 
 Karel Zak  <kzak@xxxxxxxxxx>
 http://karelzak.blogspot.com





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux