linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/3] fanotify: introduce response identifier
@ 2025-07-11 18:30 Ibrahim Jirdeh
  2025-07-11 18:30 ` [PATCH v4 1/3] fanotify: add support for a variable length permission event Ibrahim Jirdeh
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Ibrahim Jirdeh @ 2025-07-11 18:30 UTC (permalink / raw)
  To: ibrahimjirdeh; +Cc: jack, amir73il, josef, lesha, linux-fsdevel, sargun

These patches are in order to add an identifier other than fd which
can be used to respond to fanotify permission events. This is useful
for HSM use cases which are backed by a daemon to respond reliably
[1] and also for reporting pre-dir-content events without an event->fd [2]

The first few patches in the series are pulled in from Amir's work to
add support for pre-dir-content events.

In terms of testing, there are some additional LTP test cases to go with
these patches which exercise responding to events via response identifier
[3]

v3: https://lore.kernel.org/linux-fsdevel/20250711023604.593885-1-ibrahimjirdeh@meta.com/
v2: https://lore.kernel.org/linux-fsdevel/20250710042049.3705747-1-ibrahimjirdeh@meta.com/
v1: https://lore.kernel.org/linux-fsdevel/20250623193631.2780278-1-ibrahimjirdeh@meta.com/

Changes v3 => v4:
- Use ida instead of idr for response id allocation


Changes v2 => v3:
- Add build assertions on new id fields and use union fields interchangeably


Changes v1 => v2:
- Moved away from adding a unique event identifier, and instead overload
event->fd to support a response identifier for now for FAN_REPORT_FID
setting.


[1] https://lore.kernel.org/all/CAMp4zn8aXNPzq1i8KYmbRfwDBvO5Qefa4isSyS1bwYuvkuBsHg@mail.gmail.com/
[2] https://lore.kernel.org/linux-fsdevel/2dx3pbcnv5w75fxb2ghqtsk6gzl6cuxmd2rinzwbq7xxfjf5z7@3nqidi3mno46/
[3] https://github.com/ibrahim-jirdeh/ltp/commit/91c963eb6758b12ce70b87ec060308017bf08ccb

Amir Goldstein (2):
  fanotify: add support for a variable length permission event
  fanotify: allow pre-content events with fid info

Ibrahim Jirdeh (1):
  fanotify: introduce event response identifier

 fs/notify/fanotify/fanotify.c       |  72 +++++++++++----
 fs/notify/fanotify/fanotify.h       |  30 +++++--
 fs/notify/fanotify/fanotify_user.c  | 133 +++++++++++++++++++++-------
 include/linux/fanotify.h            |   1 +
 include/linux/fsnotify_backend.h    |   2 +
 include/uapi/linux/fanotify.h       |  14 ++-
 tools/include/uapi/linux/fanotify.h |  11 ++-
 7 files changed, 204 insertions(+), 59 deletions(-)

--
2.47.1

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

end of thread, other threads:[~2025-07-23 10:25 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-11 18:30 [PATCH v4 0/3] fanotify: introduce response identifier Ibrahim Jirdeh
2025-07-11 18:30 ` [PATCH v4 1/3] fanotify: add support for a variable length permission event Ibrahim Jirdeh
2025-07-22 14:01   ` Jan Kara
2025-07-22 15:13     ` Amir Goldstein
2025-07-23  7:43       ` Jan Kara
2025-07-23 10:24         ` Amir Goldstein
2025-07-11 18:31 ` [PATCH v4 2/3] fanotify: allow pre-content events with fid info Ibrahim Jirdeh
2025-07-11 18:31 ` [PATCH v4 3/3] fanotify: introduce event response identifier Ibrahim Jirdeh
2025-07-12  6:16   ` Amir Goldstein
2025-07-12 20:51   ` kernel test robot
2025-07-16  6:25   ` kernel test robot

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).