From: Lizhi Xu <lizhi.xu@windriver.com>
To: <krisman@suse.de>
Cc: <adilger.kernel@dilger.ca>, <coreteam@netfilter.org>,
<davem@davemloft.net>, <ebiggers@kernel.org>, <fw@strlen.de>,
<jaegeuk@kernel.org>, <kadlec@netfilter.org>, <kuba@kernel.org>,
<linux-ext4@vger.kernel.org>, <linux-fscrypt@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <lizhi.xu@windriver.com>,
<lkp@intel.com>, <llvm@lists.linux.dev>, <netdev@vger.kernel.org>,
<netfilter-devel@vger.kernel.org>,
<oe-kbuild-all@lists.linux.dev>, <pablo@netfilter.org>,
<syzbot+340581ba9dceb7e06fb3@syzkaller.appspotmail.com>,
<syzkaller-bugs@googlegroups.com>, <tytso@mit.edu>
Subject: [PATCH V6] fs/ext4: Filesystem without casefold feature cannot be mounted with spihash
Date: Wed, 5 Jun 2024 09:23:35 +0800 [thread overview]
Message-ID: <20240605012335.44086-1-lizhi.xu@windriver.com> (raw)
In-Reply-To: <87le3kle87.fsf@mailhost.krisman.be>
When mounting the ext4 filesystem, if the default hash version is set to
DX_HASH_SIPHASH but the casefold feature is not set, exit the mounting.
Reported-by: syzbot+340581ba9dceb7e06fb3@syzkaller.appspotmail.com
Signed-off-by: Lizhi Xu <lizhi.xu@windriver.com>
---
fs/ext4/super.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index c682fb927b64..d0645af3e66e 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -3593,6 +3593,14 @@ int ext4_feature_set_ok(struct super_block *sb, int readonly)
"mounted without CONFIG_UNICODE");
return 0;
}
+#else
+ if (EXT4_SB(sb)->s_es->s_def_hash_version == DX_HASH_SIPHASH &&
+ !ext4_has_feature_casefold(sb)) {
+ ext4_msg(sb, KERN_ERR,
+ "Filesystem without casefold feature cannot be "
+ "mounted with spihash");
+ return 0;
+ }
#endif
if (readonly)
--
2.43.0
next prev parent reply other threads:[~2024-06-05 1:24 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20240531185519.GB1153@sol.localdomain>
2024-06-01 11:37 ` [PATCH V5] ext4: check hash version and filesystem casefolded consistent Lizhi Xu
2024-06-03 14:50 ` Gabriel Krisman Bertazi
2024-06-04 1:17 ` Lizhi Xu
2024-06-04 19:06 ` Gabriel Krisman Bertazi
2024-06-05 1:16 ` Lizhi Xu
2024-06-05 1:23 ` Lizhi Xu [this message]
2024-08-22 15:00 ` [PATCH V6] fs/ext4: Filesystem without casefold feature cannot be mounted with spihash Theodore Ts'o
2024-08-27 20:16 ` [PATCH] ext4: Fix error message when rejecting the default hash Gabriel Krisman Bertazi
2024-09-05 14:53 ` Theodore Ts'o
2024-06-06 6:27 ` [PATCH V5] ext4: check hash version and filesystem casefolded consistent Eric Biggers
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=20240605012335.44086-1-lizhi.xu@windriver.com \
--to=lizhi.xu@windriver.com \
--cc=adilger.kernel@dilger.ca \
--cc=coreteam@netfilter.org \
--cc=davem@davemloft.net \
--cc=ebiggers@kernel.org \
--cc=fw@strlen.de \
--cc=jaegeuk@kernel.org \
--cc=kadlec@netfilter.org \
--cc=krisman@suse.de \
--cc=kuba@kernel.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fscrypt@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=llvm@lists.linux.dev \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=pablo@netfilter.org \
--cc=syzbot+340581ba9dceb7e06fb3@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
--cc=tytso@mit.edu \
/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