On 2026/02/10 21:49, Tetsuo Handa wrote:
> I posted "hpfs: make check=none mount option excludable" because syzbot is not
> the only fuzzer. Making it possible to exclude using kernel config option is
> beneficial to all fuzzers, and we can check whether the kernel config for fuzz
> testing purpose is appropriate.
>
> But if you can accept making check=none to behave as if check=normal, I would
> suggest the following change.
>
Hmm, since the reconfigure path does not emit "You are crazy..." message,
fuzzers might have already reported bugs after silently modifying
an error=normal mount to error=none behavior...
fs/hpfs/super.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/fs/hpfs/super.c b/fs/hpfs/super.c
index 371aa6de8075..a6ad9a12f239 100644
--- a/fs/hpfs/super.c
+++ b/fs/hpfs/super.c
@@ -442,7 +442,8 @@ static int hpfs_reconfigure(struct fs_context *fc)
sbi->sb_uid = ctx->uid; sbi->sb_gid = ctx->gid;
sbi->sb_mode = 0777 & ~ctx->umask;
sbi->sb_lowercase = ctx->lowercase;
- sbi->sb_eas = ctx->eas; sbi->sb_chk = ctx->chk;
+ sbi->sb_eas = ctx->eas;
+ sbi->sb_chk = ctx->chk ? ctx->chk : 1;
sbi->sb_chkdsk = ctx->chkdsk;
sbi->sb_err = ctx->errs; sbi->sb_timeshift = ctx->timeshift;
@@ -615,7 +616,11 @@ static int hpfs_fill_super(struct super_block *s, struct fs_context *fc)
if (sbi->sb_err == 0)
pr_err("Proceeding, but your filesystem could be corrupted if you delete files or directories\n");
}
- if (sbi->sb_chk) {
+ if (!sbi->sb_chk) {
+ sbi->sb_chk = 1;
+ pr_info("check=none was obsoleted. Treating as check=normal.\n");
+ }
+ {
unsigned a;
if (le32_to_cpu(superblock->dir_band_end) - le32_to_cpu(superblock->dir_band_start) + 1 != le32_to_cpu(superblock->n_dir_band) ||
le32_to_cpu(superblock->dir_band_end) < le32_to_cpu(superblock->dir_band_start) || le32_to_cpu(superblock->n_dir_band) > 0x4000) {
@@ -632,8 +637,7 @@ static int hpfs_fill_super(struct super_block *s, struct fs_context *fc)