From: "Paul E. McKenney" <paulmck@kernel.org>
To: Hillf Danton <hdanton@sina.com>
Cc: Dmitry Vyukov <dvyukov@google.com>,
Dave Chinner <david@fromorbit.com>,
linux-kernel@vger.kernel.org, linux-xfs@vger.kernel.org,
syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] KASAN: use-after-free Read in xfs_qm_dqfree_one
Date: Thu, 8 Dec 2022 20:14:14 -0800 [thread overview]
Message-ID: <20221209041414.GU4001@paulmck-ThinkPad-P17-Gen-1> (raw)
In-Reply-To: <20221209034605.1801-1-hdanton@sina.com>
On Fri, Dec 09, 2022 at 11:46:05AM +0800, Hillf Danton wrote:
> On 6 Dec 2022 07:32:11 -0800 "Paul E. McKenney" <paulmck@kernel.org>
> > On Tue, Dec 06, 2022 at 12:06:10PM +0100, Dmitry Vyukov wrote:
> > > On Tue, 6 Dec 2022 at 04:34, Dave Chinner <david@fromorbit.com> wrote:
> > > >
> > > > On Mon, Dec 05, 2022 at 07:12:15PM -0800, syzbot wrote:
> > > > > Hello,
> > > > >
> > > > > syzbot has tested the proposed patch but the reproducer is still triggering an issue:
> > > > > INFO: rcu detected stall in corrupted
> > > > >
> > > > > rcu: INFO: rcu_preempt detected expedited stalls on CPUs/tasks: { P4122 } 2641 jiffies s: 2877 root: 0x0/T
> > > > > rcu: blocking rcu_node structures (internal RCU debug):
> > > >
> > > > I'm pretty sure this has nothing to do with the reproducer - the
> > > > console log here:
> > > >
> > > > > Tested on:
> > > > >
> > > > > commit: bce93322 proc: proc_skip_spaces() shouldn't think it i..
> > > > > git tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> > > > > console output: https://syzkaller.appspot.com/x/log.txt?x=1566216b880000
> > > >
> > > > indicates that syzbot is screwing around with bluetooth, HCI,
> > > > netdevsim, bridging, bonding, etc.
> > > >
> > > > There's no evidence that it actually ran the reproducer for the bug
> > > > reported in this thread - there's no record of a single XFS
> > > > filesystem being mounted in the log....
> > > >
> > > > It look slike someone else also tried a private patch to fix this
> > > > problem (which was obviously broken) and it failed with exactly the
> > > > same RCU warnings. That was run from the same commit id as the
> > > > original reproducer, so this looks like either syzbot is broken or
> > > > there's some other completely unrelated problem that syzbot is
> > > > tripping over here.
> > > >
> > > > Over to the syzbot people to debug the syzbot failure....
> > >
> > > Hi Dave,
> > >
> > > It's not uncommon for a single program to trigger multiple bugs.
> > > That's what happens here. The rcu stall issue is reproducible with
> > > this test program.
> > > In such cases you can either submit more test requests, or test manually.
> > >
> > > I think there is an RCU expedited stall detection.
> > > For some reason CONFIG_RCU_EXP_CPU_STALL_TIMEOUT is limited to 21
> > > seconds, and that's not enough for reliable flake-free stress testing.
> > > We bump other timeouts to 100+ seconds.
> > > +RCU maintainers, do you mind removing the overly restrictive limit on
> > > CONFIG_RCU_EXP_CPU_STALL_TIMEOUT?
> > > Or you think there is something to fix in the kernel to not stall? I
> > > see the test writes to
> > > /proc/sys/vm/drop_caches, maybe there is some issue in that code.
> >
> > Like this?
> >
> > If so, I don't see why not. And in that case, may I please have
> > your Tested-by or similar?
> >
> > At the same time, I am sure that there are things in the kernel that
> > should be adjusted to avoid stalls, but I recognize that different
> > developers in different situations will have different issues that they
> > choose to focus on. ;-)
> >
> > Thanx, Paul
> >
> > ------------------------------------------------------------------------
> >
> > diff --git a/kernel/rcu/Kconfig.debug b/kernel/rcu/Kconfig.debug
> > index 49da904df6aa6..2984de629f749 100644
> > --- a/kernel/rcu/Kconfig.debug
> > +++ b/kernel/rcu/Kconfig.debug
> > @@ -82,7 +82,7 @@ config RCU_CPU_STALL_TIMEOUT
> > config RCU_EXP_CPU_STALL_TIMEOUT
> > int "Expedited RCU CPU stall timeout in milliseconds"
> > depends on RCU_STALL_COMMON
> > - range 0 21000
> > + range 0 300000
> > default 0
> > help
> > If a given expedited RCU grace period extends more than the
> >
> // Limit check must be consistent with the Kconfig limits for
> // CONFIG_RCU_EXP_CPU_STALL_TIMEOUT, so check the allowed range.
> // The minimum clamped value is "2UL", because at least one full
> // tick has to be guaranteed.
> till_stall_check = clamp(msecs_to_jiffies(cpu_stall_timeout), 2UL, 21UL * HZ);
>
> But with 21UL left behind intact?
Good catch, will fix, thank you!
Thanx, Paul
next prev parent reply other threads:[~2022-12-09 4:14 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-05 9:21 syzbot
2022-12-05 10:35 ` syzbot
2022-12-05 22:52 ` [PATCH] xfs: dquot shrinker doesn't check for XFS_DQFLAG_FREEING Dave Chinner
2022-12-07 16:17 ` Darrick J. Wong
2022-12-05 23:58 ` [syzbot] KASAN: use-after-free Read in xfs_qm_dqfree_one Dave Chinner
2022-12-06 3:12 ` syzbot
2022-12-06 3:34 ` Dave Chinner
2022-12-06 11:06 ` Dmitry Vyukov
2022-12-06 15:32 ` Paul E. McKenney
2022-12-06 16:19 ` Dmitry Vyukov
2022-12-06 17:47 ` Paul E. McKenney
2022-12-06 21:03 ` Dave Chinner
2022-12-06 20:58 ` Dave Chinner
[not found] ` <20221209034605.1801-1-hdanton@sina.com>
2022-12-09 4:14 ` Paul E. McKenney [this message]
[not found] <20221205140422.7412-1-hdanton@sina.com>
2022-12-05 17:06 ` syzbot
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=20221209041414.GU4001@paulmck-ThinkPad-P17-Gen-1 \
--to=paulmck@kernel.org \
--cc=david@fromorbit.com \
--cc=dvyukov@google.com \
--cc=hdanton@sina.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=syzkaller-bugs@googlegroups.com \
/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
all inboxes | Powered by JetHome®