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] [day] [month] [year] [list]
Date:   Wed, 20 Dec 2017 09:44:34 +0100 (CET)
From:   Anna-Maria Gleixner <anna-maria@...utronix.de>
To:     Peter Zijlstra <peterz@...radead.org>
cc:     Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
        LKML <linux-kernel@...r.kernel.org>,
        Ingo Molnar <mingo@...hat.com>,
        Christoph Hellwig <hch@....org>, keescook@...omium.org,
        John Stultz <john.stultz@...aro.org>,
        Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH 17/25] hrtimer: Implementation of softirq hrtimer
 handling

On Tue, 19 Dec 2017, Peter Zijlstra wrote:

> On Tue, Dec 19, 2017 at 09:58:44AM +0100, Sebastian Andrzej Siewior wrote:
> > this is late I know…
> > 
> > On 2017-09-27 18:40:26 [+0200], Peter Zijlstra wrote:
> > >  - removed superfluous local_bh_disable(), since local_irq_disable()
> > >    already implies much the same.
> > 
> > it is not superfluous.
> > 
> > > Please consider...
> > > 
> > > @@ -1768,7 +1786,6 @@ int hrtimers_dead_cpu(unsigned int scpu)
> > >  	BUG_ON(cpu_online(scpu));
> > >  	tick_cancel_sched_timer(scpu);
> > >  
> > > -	local_bh_disable();
> > >  	local_irq_disable();
> > >  	old_base = &per_cpu(hrtimer_bases, scpu);
> > >  	new_base = this_cpu_ptr(&hrtimer_bases);
> > > @@ -1796,7 +1813,6 @@ int hrtimers_dead_cpu(unsigned int scpu)
> > >  	/* Check, if we got expired work to do */
> > >  	__hrtimer_peek_ahead_timers();
> > >  	local_irq_enable();
> > > -	local_bh_enable();
> > >  	return 0;
> > >  }
> > 
> > we need in there. That local_bh_disable() is required in order to let
> > raise_softirq_irqoff() not do anything stupid in particular we need
> > !in_interrupt() defer wakeup_softirqd() until local_bh_enable().
> > Otherwise wakeup_softirqd() might actually try to wakeup the process and
> > go after the pi_lock which can't happen while holding cpu_base->lock.
> 
> Argh, that's horrible and definitely needs a comment.
> 

will add it in v4 with a comment.

Anna-Maria

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ