linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/3] New fanotify API for ignoring events
@ 2022-06-29 14:42 Amir Goldstein
  2022-06-29 14:42 ` [PATCH v3 1/3] fanotify: prepare for setting event flags in ignore mask Amir Goldstein
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Amir Goldstein @ 2022-06-29 14:42 UTC (permalink / raw)
  To: Jan Kara; +Cc: Matthew Bobrowski, linux-fsdevel, linux-api

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@gmail.com/
[v2] https://lore.kernel.org/linux-fsdevel/20220624143538.2500990-1-amir73il@gmail.com/
[1] https://lore.kernel.org/linux-fsdevel/20220428123824.ssq72ovqg2nao5f4@quack3.lan/
[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@gmail.com/

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


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

end of thread, other threads:[~2022-07-01 13:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-29 14:42 [PATCH v3 0/3] New fanotify API for ignoring events Amir Goldstein
2022-06-29 14:42 ` [PATCH v3 1/3] fanotify: prepare for setting event flags in ignore mask Amir Goldstein
2022-07-01 12:47   ` Jan Kara
2022-07-01 13:32     ` Amir Goldstein
2022-06-29 14:42 ` [PATCH v3 2/3] fanotify: cleanups for fanotify_mark() input validations Amir Goldstein
2022-06-29 14:42 ` [PATCH v3 3/3] fanotify: introduce FAN_MARK_IGNORE 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).