[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANp29Y6XNE_wxx1Osa+RrfqOUP9PZhScGnMUDgQ-qqHzYe9KFg@mail.gmail.com>
Date: Thu, 30 Mar 2023 10:52:37 +0200
From: Aleksandr Nogikh <nogikh@...gle.com>
To: Dave Chinner <david@...morbit.com>
Cc: syzbot <syzbot+0c383e46e9b4827b01b1@...kaller.appspotmail.com>,
djwong@...nel.org, linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-xfs@...r.kernel.org,
syzkaller-bugs@...glegroups.com
Subject: Re: [syzbot] [xfs?] WARNING in xfs_bmap_extents_to_btree
On Thu, Mar 30, 2023 at 3:27 AM 'Dave Chinner' via syzkaller-bugs
<syzkaller-bugs@...glegroups.com> wrote:
>
> On Tue, Mar 28, 2023 at 09:08:01PM -0700, syzbot wrote:
> > Hello,
> >
> > syzbot found the following issue on:
> >
> > HEAD commit: 1e760fa3596e Merge tag 'gfs2-v6.3-rc3-fix' of git://git.ke..
> > git tree: upstream
> > console output: https://syzkaller.appspot.com/x/log.txt?x=16f83651c80000
> > kernel config: https://syzkaller.appspot.com/x/.config?x=acdb62bf488a8fe5
> > dashboard link: https://syzkaller.appspot.com/bug?extid=0c383e46e9b4827b01b1
> > compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2
> >
> > Unfortunately, I don't have any reproducer for this issue yet.
> >
> > Downloadable assets:
> > disk image: https://storage.googleapis.com/syzbot-assets/17229b6e6fe0/disk-1e760fa3.raw.xz
> > vmlinux: https://storage.googleapis.com/syzbot-assets/69b5d310fba0/vmlinux-1e760fa3.xz
> > kernel image: https://storage.googleapis.com/syzbot-assets/0c65624aace9/bzImage-1e760fa3.xz
> >
> > IMPORTANT: if you fix the issue, please add the following tag to the commit:
> > Reported-by: syzbot+0c383e46e9b4827b01b1@...kaller.appspotmail.com
> >
> > ------------[ cut here ]------------
> > WARNING: CPU: 1 PID: 24101 at fs/xfs/libxfs/xfs_bmap.c:660 xfs_bmap_extents_to_btree+0xe1b/0x1190
>
> Allocation got an unexpected ENOSPC when it was supposed to have a
> valid reservation for the space. Likely because of an inconsistency
> that had been induced into the filesystem where superblock space
> accounting doesn't exactly match the AG space accounting and/or the
> tracked free space.
>
> Given this is a maliciously corrupted filesystem image, this sort of
> warning is expected and there's probably nothing we can do to avoid
> it short of a full filesystem verification pass during mount.
> That's not a viable solution, so I think we should just ignore
> syzbot when it generates this sort of warning....
If it's not a warning about a kernel bug, then WARN_ON should probably
be replaced by some more suitable reporting mechanism. Kernel coding
style document explicitly says:
"WARN*() must not be used for a condition that is expected to trigger
easily, for example, by user space actions. pr_warn_once() is a
possible alternative, if you need to notify the user of a problem."
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/coding-style.rst?id=1e760fa3596e8c7f08412712c168288b79670d78#n1223
--
Aleksandr
>
> i.e. we actually want this warning to be issued if it happens in
> normal production situations, but given that it's relatively trivial
> to create an inconsistent filesystem image that can trigger this we
> should just ignore it when it is generated by such means.
>
> -Dave.
> --
> Dave Chinner
> david@...morbit.com
>
Powered by blists - more mailing lists