[PATCH v3 0/3] 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.

We use the opportunity of the new API to further restict the events
and flags that are allowed in ignore mask of a non-dir inode mark and
we require FAN_MARK_IGNORED_SURV_MODIFY for dir/mount/sb ignore mark
to remove from the test matrix a lot of notsensical combinations.

I extended the LTP tests [2] to cover the bug that you pointed out
in [v1] review. I verified that the 6 relevant test cases fail with
the buggy v1 version and pass in this version.

The man page draft [3] has been updated to reflect the new restrictions,
some of which have already been added by a Fixes patch [4].

Thanks,
Amir.

Changes since [v2]:
- Rebase on top of API restriction patch
- Require FAN_MARK_IGNORED_SURV_MODIFY for dir/mount/sb ignore mark
- Add test coverage and update man page with new restrictions

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

[v1] https://lore.kernel.org/linux-fsdevel/20220620134551.2066847-1-amir73il@xxxxxxxxx/
[v2] https://lore.kernel.org/linux-fsdevel/20220624143538.2500990-1-amir73il@xxxxxxxxx/
[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
[4] https://lore.kernel.org/linux-fsdevel/20220627174719.2838175-1-amir73il@xxxxxxxxx/

Amir Goldstein (3):
  fanotify: prepare for setting event flags in ignore mask
  fanotify: cleanups for fanotify_mark() input validations
  fanotify: introduce FAN_MARK_IGNORE

 fs/notify/fanotify/fanotify.c      |  19 ++---
 fs/notify/fanotify/fanotify.h      |   2 +
 fs/notify/fanotify/fanotify_user.c | 110 ++++++++++++++++++++++-------
 fs/notify/fdinfo.c                 |   6 +-
 fs/notify/fsnotify.c               |  21 +++---
 include/linux/fanotify.h           |  14 ++--
 include/linux/fsnotify_backend.h   |  89 +++++++++++++++++++++--
 include/uapi/linux/fanotify.h      |   8 +++
 8 files changed, 212 insertions(+), 57 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