Centos-kernel-stream-9/fs/notify
Miklos Szeredi e908619dbd fanotify: limit reporting of event with non-decodeable file handles
JIRA: https://issues.redhat.com/browse/RHEL-102134

commit 97ac489775f26acfd46a8a60c2f84ce7cc79fa4b
Author: Amir Goldstein <amir73il@gmail.com>
Date:   Wed Oct 18 12:59:56 2023 +0300

    fanotify: limit reporting of event with non-decodeable file handles

    Commit a95aef69a740 ("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 16aac5ad1fa9 ("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: a95aef69a740 ("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>

Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
2025-07-07 17:32:19 +02:00
..
dnotify dnotify: Pass argument of fcntl_dirnotify as int 2025-07-07 17:32:18 +02:00
fanotify fanotify: limit reporting of event with non-decodeable file handles 2025-07-07 17:32:19 +02:00
inotify inotify: Avoid reporting event with invalid wd 2025-07-07 17:32:18 +02:00
Kconfig fs/notify: Remove "select SRCU" 2023-12-05 17:57:46 -07:00
Makefile
fdinfo.c fanotify: prepare for setting event flags in ignore mask 2025-07-07 17:32:18 +02:00
fdinfo.h
fsnotify.c fsnotify: Fix comment typo 2025-07-07 17:32:18 +02:00
fsnotify.h fsnotify: remove unused declaration 2025-07-07 17:32:18 +02:00
group.c fsnotify: create helpers for group mark_mutex lock 2025-07-07 17:32:17 +02:00
mark.c fsnotify: allow adding an inode mark without pinning inode 2025-07-07 17:32:17 +02:00
notification.c fsnotify: Pass group argument to free_event 2025-07-07 17:32:14 +02:00