[PATCH v2 0/2] New fanotify API for ignoring events

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

 



Hi Jan,

As we discussed [1], here is the implementation of the new
FAN_MARK_IGNORE API, to try and sort the historic mess of
FAN_MARK_IGNORED_MASK.

To address the bug you pointed out in v1 review, I added
helpers fsnotify_effective_ignore_mask() and
fsnotify_mask_applicable().

fsnotify_effective_ignore_mask() is used also in send_to_group(),
but not fsnotify_mask_applicable().

We could also use fsnotify_mask_applicable() for mark->mask
in send_to_group(), but then we will need to set FS_ISDIR in masks
on inotify/dnotify/... marks, so I don't think it is worth it(?).
We may need to change the helper names though to clarify this
subtle detail.

See LTP tests [2] and man page draft [3].

Thanks,
Amir.

Changes since v1:
- Replace "sticky" semantics with EEXITS error (Jan)
- Simplify EINVAL checks (Jan)
- Add missing ignore mask accessors
- Add fsnotify_effective_ignore_mask() helper

[1] https://lore.kernel.org/linux-fsdevel/20220428123824.ssq72ovqg2nao5f4@xxxxxxxxxx/
[2] https://github.com/amir73il/ltp/commits/fan_mark_ignore
[3] https://github.com/amir73il/man-pages/commits/fan_mark_ignore


Amir Goldstein (2):
  fanotify: prepare for setting event flags in ignore mask
  fanotify: introduce FAN_MARK_IGNORE

 fs/notify/fanotify/fanotify.c      | 19 ++++----
 fs/notify/fanotify/fanotify.h      |  2 +
 fs/notify/fanotify/fanotify_user.c | 61 +++++++++++++++++-------
 fs/notify/fdinfo.c                 |  6 +--
 fs/notify/fsnotify.c               | 21 +++++----
 include/linux/fanotify.h           |  5 +-
 include/linux/fsnotify_backend.h   | 74 +++++++++++++++++++++++++++---
 include/uapi/linux/fanotify.h      |  2 +
 8 files changed, 147 insertions(+), 43 deletions(-)

-- 
2.25.1




[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