[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <160075336.817667.1765132604290@kpc.webmail.kpnmail.nl>
Date: Sun, 7 Dec 2025 19:36:44 +0100 (CET)
From: Jori Koolstra <jkoolstra@...all.nl>
To: Jan Kara <jack@...e.cz>
Cc: Christian Brauner <brauner@...nel.org>,
Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>,
Taotao Chen <chentaotao@...iglobal.com>,
Shuah Khan <skhan@...uxfoundation.org>, linux-kernel@...r.kernel.org,
syzbot+5ad0824204c7bf9b67f2@...kaller.appspotmail.com
Subject: Re: [PATCH 2/3] minix: Add required sanity checking to
minix_check_superblock()
Hi Jan,
> >
> > diff --git a/fs/minix/inode.c b/fs/minix/inode.c
> > index 7897f5123b3d..8eb26ff91adf 100644
> > --- a/fs/minix/inode.c
> > +++ b/fs/minix/inode.c
> > @@ -171,7 +171,14 @@ static bool minix_check_superblock(struct super_block *sb)
> > {
> > struct minix_sb_info *sbi = minix_sb(sb);
> >
> > - if (sbi->s_imap_blocks == 0 || sbi->s_zmap_blocks == 0)
> > + if (sbi->s_log_zone_size != 0) {
> > + printk("minix-fs error: zone size must equal block size. "
> > + "s_log_zone_size > 0 is not supported.\n");
> > + return false;
> > + }
> > +
> > + if (sbi->s_ninodes < 1 || sbi->s_firstdatazone <= 4 ||
> > + sbi->s_firstdatazone >= sbi->s_nzones)
> > return false;
>
> OK, but why did you remove the s_imap_blocks and s_zmap_blocks checks?
>
I replied to this a while ago that this already happens later in
minix_fill_superblock:
https://elixir.bootlin.com/linux/v6.18-rc7/source/fs/minix/inode.c#L280
Maybe you missed it. Let me know if this answers your question when you
have time.
Thanks,
Jori.
Powered by blists - more mailing lists