Skip to content

Fixes for fanotify name events

Amir Goldstein linux-fsdevel 1 version Applied

Status from this message: Applied. Thanks!

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest9 patches 10 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/9fanotify: fix reporting event to sb/mount marksfs/notify/fanotify/fanotify.c+3 -51 reply
2/9inotify: do not set FS_EVENT_ON_CHILD in non-dir mark maskfs/notify/inotify/inotify_user.c+8 -61 reply
3/9audit: do not set FS_EVENT_ON_CHILD in audit marks maskkernel/audit_fsnotify.c kernel/audit_watch.c+2 -21 reply
4/9fsnotify: create helper fsnotify_inode()fs/kernfs/file.c fs/notify/fsnotify.c include/linux/fsnotify.h +1 more+15 -221 reply
5/9fsnotify: simplify dir argument to handle_event()fs/notify/dnotify/dnotify.c fs/notify/fanotify/fanotify.c fs/notify/fsnotify.c +1 more+7 -81 reply
6/9fsnotify: pass dir and inode arguments to fsnotify()fs/kernfs/file.c fs/notify/fsnotify.c include/linux/fsnotify.h +1 more+52 -261 reply
7/9fsnotify: fix merge with parent mark masksfs/notify/fanotify/fanotify.c fs/notify/fsnotify.c+14 -81 reply
8/9fsnotify: create method handle_inode_event() in fsnotify_operationsfs/nfsd/filecache.c fs/notify/dnotify/dnotify.c fs/notify/fsnotify.c +4 more+97 -711 reply
9/9fsnotify: pass inode to fsnotify_parent()include/linux/fsnotify.h+6 -51 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/9] Fixes for fanotify name events

Jan,

Following your feedback [1] to fanotify name events, I wrote some LTP tests [2] to add missing test coverage:

1) dnotify/inotify: report event to both parent and child - catches the dnotify bug I had in v4 after unified event patch

2) fanotify10: add groups with FAN_REPORT_NAME to the setup - catches the bug you noticed in fanotify_group_event_mask()

3) fanotify10: add test cases with ignored mask on watching parent - catches the inconsistecy with ignored masks that you noticed [*]

The patches in this series apply to your fsnotify branch and are avaiable on my fsnotify-fixes branch [3].

Patch 1 fixes issue #2 above
Patch 2 fixes another issue found by tests Patch 3 fixes a minor issue found by code review Patches 4-6 simplify the code based on your suggestions Patch 7 depends on 4-6 and fixes issue #3 above [*]

Optional patches:
Patch 8 implements your suggestion of simplified handler_event() Patch 9 is a possible fix for kernel test robot reported performance regression. I did not get any feedback on it, but it is trivial.

Thanks,
Amir.

[*] The tests for merging ignored mask on watching parent set the
event FAN_OPEN in both mark mask and ignored mask and set the flag FAN_EVENT_ON_CHILD in mark mask, because the expected behavior in this case is well defined. I have patches to fix the case of FAN_OPEN in ignored mask and flag FAN_EVENT_ON_CHILD in mark mask, but decided not to post them at this time.

[1] https://lore.kernel.org/linux-fsdevel/[email protected]/
[2] https://github.com/amir73il/ltp/commits/fsnotify_parent
[3] https://github.com/amir73il/linux/commits/fsnotify-fixes

Amir Goldstein (9):
fanotify: fix reporting event to sb/mount marks
inotify: do not set FS_EVENT_ON_CHILD in non-dir mark mask
audit: do not set FS_EVENT_ON_CHILD in audit marks mask
fsnotify: create helper fsnotify_inode()
fsnotify: simplify dir argument to handle_event()
fsnotify: pass dir and inode arguments to fsnotify()
fsnotify: fix merge with parent mark masks
fsnotify: create method handle_inode_event() in fsnotify_operations
fsnotify: pass inode to fsnotify_parent()

 fs/kernfs/file.c                 |  11 ++-
 fs/nfsd/filecache.c              |  12 ++--
 fs/notify/dnotify/dnotify.c      |  38 +++-------
 fs/notify/fanotify/fanotify.c    |  17 +++--
 fs/notify/fsnotify.c             | 118 +++++++++++++++++++++++++------
 fs/notify/inotify/inotify_user.c |  14 ++--
 include/linux/fsnotify.h         |  44 ++++++------
 include/linux/fsnotify_backend.h |  33 ++++++---
 kernel/audit_fsnotify.c          |  22 +++---
 kernel/audit_tree.c              |  10 ++-
 kernel/audit_watch.c             |  19 +++--
 kernel/trace/trace.c             |   3 +-
 12 files changed, 196 insertions(+), 145 deletions(-)
Signature · 1 line
2.17.1