From: Amir Goldstein <amir73il@gmail.com>
To: Jan Kara <jack@suse.cz>
Cc: Matthew Bobrowski <repnop@google.com>,
linux-fsdevel@vger.kernel.org, linux-api@vger.kernel.org
Subject: [PATCH v3 0/3] New fanotify API for ignoring events
Date: Wed, 29 Jun 2022 17:42:07 +0300 [thread overview]
Message-ID: <20220629144210.2983229-1-amir73il@gmail.com> (raw)
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
next reply other threads:[~2022-06-29 14:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-29 14:42 Amir Goldstein [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220629144210.2983229-1-amir73il@gmail.com \
--to=amir73il@gmail.com \
--cc=jack@suse.cz \
--cc=linux-api@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=repnop@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.