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: <20220309222520.GF68899@lothringen>
Date:   Wed, 9 Mar 2022 23:25:20 +0100
From:   Frederic Weisbecker <frederic@...nel.org>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     LKML <linux-kernel@...r.kernel.org>, Phil Auld <pauld@...hat.com>,
        Alex Belits <abelits@...vell.com>,
        Nicolas Saenz Julienne <nsaenz@...nel.org>,
        Xiongfeng Wang <wangxiongfeng2@...wei.com>,
        Neeraj Upadhyay <quic_neeraju@...cinc.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Yu Liao <liaoyu15@...wei.com>,
        Boqun Feng <boqun.feng@...il.com>,
        "Paul E . McKenney" <paulmck@...nel.org>,
        Marcelo Tosatti <mtosatti@...hat.com>,
        Paul Gortmaker <paul.gortmaker@...driver.com>,
        Uladzislau Rezki <uladzislau.rezki@...y.com>,
        Joel Fernandes <joel@...lfernandes.org>
Subject: Re: [PATCH 09/19] rcu/context-tracking: Remove rcu_irq_enter/exit()

On Sat, Mar 05, 2022 at 03:16:03PM +0100, Peter Zijlstra wrote:
> On Wed, Mar 02, 2022 at 04:48:00PM +0100, Frederic Weisbecker wrote:
> >  void ct_irq_enter_irqson(void)
> >  {
> > -	rcu_irq_enter_irqson();
> > +	unsigned long flags;
> > +
> > +	local_irq_save(flags);
> > +	ct_irq_enter();
> > +	local_irq_restore(flags);
> >  }
> >  
> >  void ct_irq_exit_irqson(void)
> >  {
> > -	rcu_irq_exit_irqson();
> > +	unsigned long flags;
> > +
> > +	local_irq_save(flags);
> > +	ct_irq_exit();
> > +	local_irq_restore(flags);
> >  }
> 
> I know you're just copying code around, but this is broken per
> construction :/
> 
> On the irq_enter site, local_irq_save() will hit a tracepoint, which
> requires RCU, which will only be made available by the ct_irq_enter().
> Same in reverse for the exit case.

Ouch. And playing a game similar to that in default_idle_call() is going to
be trickier because rcu_irq_enter() may or may not exit an RCU-off mode. But it's
feasible. Again I'll fix it ahead.

Thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ