[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOQ4uxg0Fmh58bvTKFyHDhAsmCtgbxpHr+mHYY=O9Wcuo_1JZQ@mail.gmail.com>
Date: Sun, 12 Apr 2020 12:40:04 +0300
From: Amir Goldstein <amir73il@...il.com>
To: Ritesh Harjani <riteshh@...ux.ibm.com>
Cc: syzbot <syzbot+77fa5bdb65cc39711820@...kaller.appspotmail.com>,
Ext4 Developers List <linux-ext4@...r.kernel.org>,
overlayfs <linux-unionfs@...r.kernel.org>,
Matthew Wilcox <willy@...radead.org>,
"Darrick J. Wong" <darrick.wong@...cle.com>,
Christoph Hellwig <hch@...radead.org>, Jan Kara <jack@...e.cz>,
linux-fsdevel <linux-fsdevel@...r.kernel.org>,
linux-kernel <linux-kernel@...r.kernel.org>,
linux-xfs <linux-xfs@...r.kernel.org>,
syzkaller-bugs <syzkaller-bugs@...glegroups.com>,
Theodore Tso <tytso@....edu>
Subject: Re: WARNING in iomap_apply
On Sun, Apr 12, 2020 at 12:17 PM Ritesh Harjani <riteshh@...ux.ibm.com> wrote:
>
>
>
> On 4/11/20 9:44 PM, Matthew Wilcox wrote:
> > On Sat, Apr 11, 2020 at 12:39:13AM -0700, syzbot wrote:
> >> The bug was bisected to:
> >>
> >> commit d3b6f23f71670007817a5d59f3fbafab2b794e8c
> >> Author: Ritesh Harjani <riteshh@...ux.ibm.com>
> >> Date: Fri Feb 28 09:26:58 2020 +0000
> >>
> >> ext4: move ext4_fiemap to use iomap framework
> >>
> >> bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=16c62a57e00000
> >> final crash: https://syzkaller.appspot.com/x/report.txt?x=15c62a57e00000
> >> console output: https://syzkaller.appspot.com/x/log.txt?x=11c62a57e00000
> >>
> >> IMPORTANT: if you fix the bug, please add the following tag to the commit:
> >> Reported-by: syzbot+77fa5bdb65cc39711820@...kaller.appspotmail.com
> >> Fixes: d3b6f23f7167 ("ext4: move ext4_fiemap to use iomap framework")
> >>
> >> ------------[ cut here ]------------
> >> WARNING: CPU: 0 PID: 7023 at fs/iomap/apply.c:51 iomap_apply+0xa0c/0xcb0 fs/iomap/apply.c:51
> >
> > This is:
> >
> > if (WARN_ON(iomap.length == 0))
> > return -EIO;
> >
> > and the call trace contains ext4_fiemap() so the syzbot bisection looks
> > correct.
>
> I think I know what could be going wrong here.
>
> So the problem happens when we have overlayfs mounted on top of ext4.
> Now overlayfs might be supporting max logical filesize which is more
> than what ext4 could support (i.e. sb->s_maxbytes for overlayfs must
> be greater than compared to ext4). So that's why the check in func
> ioctl_fiemap -> fiemap_check_ranges() couldn't truncate to logical
> filesize which the actual underlying filesystem supports.
>
> @All,
> Do you think we should make overlayfs also check for
> fiemap_check_ranges()? Not as part of this fix, but as a later
> addition to overlayfs? Please let me know, I could also make that patch.
>
Yes, I think that would be correct.
Thanks,
Amir.
Powered by blists - more mailing lists