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]
Message-ID: <20200818103424.GQ2674@hirez.programming.kicks-ass.net>
Date:   Tue, 18 Aug 2020 12:34:24 +0200
From:   peterz@...radead.org
To:     "Paul E. McKenney" <paulmck@...nel.org>
Cc:     mingo@...nel.org, torvalds@...ux-foundation.org,
        linux-kernel@...r.kernel.org, will@...nel.org, hch@....de,
        axboe@...nel.dk, chris@...is-wilson.co.uk, davem@...emloft.net,
        kuba@...nel.org, fweisbec@...il.com, oleg@...hat.com
Subject: Re: [RFC][PATCH 1/9] irq_work: Cleanup

On Mon, Aug 17, 2020 at 06:00:05AM -0700, Paul E. McKenney wrote:
> On Mon, Aug 17, 2020 at 11:16:33AM +0200, peterz@...radead.org wrote:
> > On Mon, Aug 17, 2020 at 11:03:25AM +0200, peterz@...radead.org wrote:
> > > On Thu, Jul 23, 2020 at 09:14:11AM -0700, Paul E. McKenney wrote:
> > > > > --- a/kernel/rcu/tree.c
> > > > > +++ b/kernel/rcu/tree.c
> > > > > @@ -1287,8 +1287,6 @@ static int rcu_implicit_dynticks_qs(stru
> > > > >  		if (IS_ENABLED(CONFIG_IRQ_WORK) &&
> > > > >  		    !rdp->rcu_iw_pending && rdp->rcu_iw_gp_seq != rnp->gp_seq &&
> > > > >  		    (rnp->ffmask & rdp->grpmask)) {
> > > > > -			init_irq_work(&rdp->rcu_iw, rcu_iw_handler);
> > > > 
> > > > We are actually better off with the IRQ_WORK_INIT_HARD() here rather
> > > > than unconditionally at boot.
> > > 
> > > Ah, but there isn't an init_irq_work() variant that does the HARD thing.
> > 
> > Ah you meant doing:
> > 
> > 		rdp->rcu_iw = IRQ_WORK_INIT_HARD(rcu_iw_handler)
> > 
> > But then it is non-obvious how that doesn't trample state. I suppose
> > that rcu_iw_pending thing ensures that... I'll think about it.
> 
> Yes, this is what I had in mind.  And you are right, the point of the
> !rdp->rcu_iw_pending check is to prevent initialization while still
> in use.

So I checked my notes, and the plan was to replace rcu_iw_pending with
irq_work pending bit, but for that we musnt't clobber that state every
time.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ