From: cel@kernel.org
To: amir73il@gmail.com, gregkh@linuxfoundation.org, jack@suse.cz,
sashal@kernel.org, stable@vger.kernel.org,
adilger.kernel@dilger.ca, linux-ext4@vger.kernel.org,
tytso@mit.edu, alexey.makhalov@broadcom.com,
vasavi.sirnapalli@broadcom.com, florian.fainelli@broadcom.com
Cc: Chuck Lever <chuck.lever@oracle.com>,
Gabriel Krisman Bertazi <gabriel@krisman.be>
Subject: [PATCH v5.15.y] Revert "fanotify: Allow users to request FAN_FS_ERROR events"
Date: Tue, 23 Jul 2024 17:42:46 -0400 [thread overview]
Message-ID: <20240723214246.4010-1-cel@kernel.org> (raw)
In-Reply-To: <875xswtbxb.fsf@mailhost.krisman.be>
From: Chuck Lever <chuck.lever@oracle.com>
Gabriel says:
> 9709bd548f11 just enabled a new feature -
> which seems against stable rules. Considering that "anything is
> a CVE", we really need to be cautious about this kind of stuff in
> stable kernels.
>
> Is it possible to drop 9709bd548f11 from stable instead?
The revert wasn't clean, but adjusting it to fit was straightforward.
This passes NFSD CI, and adds no new failures to the fanotify ltp
tests.
Reported-by: Gabriel Krisman Bertazi <gabriel@krisman.be>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
fs/notify/fanotify/fanotify_user.c | 4 ----
include/linux/fanotify.h | 6 +-----
2 files changed, 1 insertion(+), 9 deletions(-)
Gabriel, is this what you were thinking?
diff --git a/fs/notify/fanotify/fanotify_user.c b/fs/notify/fanotify/fanotify_user.c
index d93418f21386..0d91db1c7249 100644
--- a/fs/notify/fanotify/fanotify_user.c
+++ b/fs/notify/fanotify/fanotify_user.c
@@ -1701,10 +1701,6 @@ static int do_fanotify_mark(int fanotify_fd, unsigned int flags, __u64 mask,
group->priority == FS_PRIO_0)
goto fput_and_out;
- if (mask & FAN_FS_ERROR &&
- mark_type != FAN_MARK_FILESYSTEM)
- goto fput_and_out;
-
/*
* Evictable is only relevant for inode marks, because only inode object
* can be evicted on memory pressure.
diff --git a/include/linux/fanotify.h b/include/linux/fanotify.h
index 558844c8d259..df60b46971c9 100644
--- a/include/linux/fanotify.h
+++ b/include/linux/fanotify.h
@@ -97,13 +97,9 @@ extern struct ctl_table fanotify_table[]; /* for sysctl */
#define FANOTIFY_INODE_EVENTS (FANOTIFY_DIRENT_EVENTS | \
FAN_ATTRIB | FAN_MOVE_SELF | FAN_DELETE_SELF)
-/* Events that can only be reported with data type FSNOTIFY_EVENT_ERROR */
-#define FANOTIFY_ERROR_EVENTS (FAN_FS_ERROR)
-
/* Events that user can request to be notified on */
#define FANOTIFY_EVENTS (FANOTIFY_PATH_EVENTS | \
- FANOTIFY_INODE_EVENTS | \
- FANOTIFY_ERROR_EVENTS)
+ FANOTIFY_INODE_EVENTS)
/* Events that require a permission response from user */
#define FANOTIFY_PERM_EVENTS (FAN_OPEN_PERM | FAN_ACCESS_PERM | \
--
2.45.2
next prev parent reply other threads:[~2024-07-23 21:43 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20240618123422.213844892@linuxfoundation.org>
2024-07-23 7:06 ` [PATCH 5.10 387/770] fanotify: Allow users to request FAN_FS_ERROR events Ajay Kaher
2024-07-23 9:20 ` Amir Goldstein
2024-07-23 13:47 ` Chuck Lever III
2024-07-24 6:52 ` Amir Goldstein
2024-07-23 14:34 ` Gabriel Krisman Bertazi
2024-07-23 15:57 ` Chuck Lever III
2024-07-23 21:42 ` cel [this message]
2024-07-23 23:24 ` [PATCH v5.15.y] Revert "fanotify: Allow users to request FAN_FS_ERROR events" Gabriel Krisman Bertazi
2024-07-24 6:42 ` Amir Goldstein
2024-07-23 9:29 ` [PATCH 5.10 387/770] fanotify: Allow users to request FAN_FS_ERROR events Jan Kara
2024-07-23 10:13 ` Amir Goldstein
2024-07-23 10:47 ` Jan Kara
2024-07-23 13:44 ` Chuck Lever III
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=20240723214246.4010-1-cel@kernel.org \
--to=cel@kernel.org \
--cc=adilger.kernel@dilger.ca \
--cc=alexey.makhalov@broadcom.com \
--cc=amir73il@gmail.com \
--cc=chuck.lever@oracle.com \
--cc=florian.fainelli@broadcom.com \
--cc=gabriel@krisman.be \
--cc=gregkh@linuxfoundation.org \
--cc=jack@suse.cz \
--cc=linux-ext4@vger.kernel.org \
--cc=sashal@kernel.org \
--cc=stable@vger.kernel.org \
--cc=tytso@mit.edu \
--cc=vasavi.sirnapalli@broadcom.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox