lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201209124233.GM2414@hirez.programming.kicks-ass.net>
Date:   Wed, 9 Dec 2020 13:42:33 +0100
From:   Peter Zijlstra <peterz@...radead.org>
To:     Thomas Gleixner <tglx@...utronix.de>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        Frederic Weisbecker <frederic@...nel.org>,
        Paul McKenney <paulmck@...nel.org>,
        Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
        Boqun Feng <boqun.feng@...il.com>,
        Ingo Molnar <mingo@...nel.org>, Will Deacon <will@...nel.org>
Subject: Re: [patch V2 4/9] softirq: Make softirq control and processing RT
 aware

On Wed, Dec 09, 2020 at 01:36:54PM +0100, Thomas Gleixner wrote:
> On Wed, Dec 09 2020 at 11:11, Peter Zijlstra wrote:
> > On Fri, Dec 04, 2020 at 06:01:55PM +0100, Thomas Gleixner wrote:
> >> From: Thomas Gleixner <tglx@...utronix.de>
> >> +	/* First entry of a task into a BH disabled section? */
> >> +	if (!current->softirq_disable_cnt) {
> >> +		if (preemptible()) {
> >> +			local_lock(&softirq_ctrl.lock);
> >
> > AFAICT this significantly changes the locking rules.
> >
> > Where previously we could do:
> >
> > 	spin_lock(&ponies)
> > 	spin_lock_bh(&foo);
> >
> > vs
> >
> > 	spin_lock_bh(&bar);
> > 	spin_lock(&ponies)
> >
> > provided the rest of the code observed: bar -> ponies -> foo
> > and never takes ponies from in-softirq.
> >
> > This is now a genuine deadlock on RT.
> 
> I know, but making this work is trying to square the circle.

:-)

> Any approach we tried before going this way had worse problems than
> this particular limitation.

OK, but that would've been very good Changelog material methinks.

Also, then we should probably make sure PREEMPT_RT=n builds start
suffering the same problem by adding the local_lock unconditionally,
otherwise this keeps being a PREEMPT_RT special and we'll keep having to
fix it up.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ