linux-stable/fs/notify
Amir Goldstein 97ac489775 fanotify: limit reporting of event with non-decodeable file handles
Commit a95aef69a7 ("fanotify: support reporting non-decodeable file
handles") merged in v6.5-rc1, added the ability to use an fanotify group
with FAN_REPORT_FID mode to watch filesystems that do not support nfs
export, but do know how to encode non-decodeable file handles, with the
newly introduced AT_HANDLE_FID flag.

At the time that this commit was merged, there were no filesystems
in-tree with those traits.

Commit 16aac5ad1f ("ovl: support encoding non-decodable file handles"),
merged in v6.6-rc1, added this trait to overlayfs, thus allowing fanotify
watching of overlayfs with FAN_REPORT_FID mode.

In retrospect, allowing an fanotify filesystem/mount mark on such
filesystem in FAN_REPORT_FID mode will result in getting events with
file handles, without the ability to resolve the filesystem objects from
those file handles (i.e. no open_by_handle_at() support).

For v6.6, the safer option would be to allow this mode for inode marks
only, where the caller has the opportunity to use name_to_handle_at() at
the time of setting the mark. In the future we can revise this decision.

Fixes: a95aef69a7 ("fanotify: support reporting non-decodeable file handles")
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Message-Id: <20231018100000.2453965-2-amir73il@gmail.com>
2023-10-19 16:19:20 +02:00
..
dnotify dnotify: Pass argument of fcntl_dirnotify as int 2023-07-10 14:36:12 +02:00
fanotify fanotify: limit reporting of event with non-decodeable file handles 2023-10-19 16:19:20 +02:00
inotify inotify: Avoid reporting event with invalid wd 2023-04-25 12:36:55 +02:00
Kconfig fs/notify: Remove "select SRCU" 2023-02-02 16:26:06 -08:00
Makefile
fdinfo.c exportfs: add explicit flag to request non-decodeable file handles 2023-05-22 18:08:37 +02:00
fdinfo.h
fsnotify.c fsnotify: Fix comment typo 2022-07-26 13:38:47 +02:00
fsnotify.h fsnotify: remove unused declaration 2022-09-09 11:40:03 +02:00
group.c fsnotify: create helpers for group mark_mutex lock 2022-04-25 14:37:22 +02:00
mark.c fsnotify: allow adding an inode mark without pinning inode 2022-04-25 14:42:45 +02:00
notification.c fsnotify: Pass group argument to free_event 2021-10-27 12:34:18 +02:00