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: <20200322023937.GD9634@lenoir>
Date:   Sun, 22 Mar 2020 03:39:38 +0100
From:   Frederic Weisbecker <frederic@...nel.org>
To:     Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc:     linux-kernel@...r.kernel.org, linux-tip-commits@...r.kernel.org,
        Thomas Gleixner <tglx@...utronix.de>,
        "Peter Zijlstra (Intel)" <peterz@...radead.org>,
        x86 <x86@...nel.org>
Subject: Re: [tip: locking/core] lockdep: Annotate irq_work

On Sun, Mar 22, 2020 at 03:33:30AM +0100, Frederic Weisbecker wrote:
> On Sat, Mar 21, 2020 at 07:12:49PM +0100, Sebastian Andrzej Siewior wrote:
> > On 2020-03-21 17:40:58 [+0100], Frederic Weisbecker wrote:
> > > > diff --git a/include/linux/irqflags.h b/include/linux/irqflags.h
> > > > index 9c17f9c..f23f540 100644
> > > > --- a/include/linux/irqflags.h
> > > > +++ b/include/linux/irqflags.h
> > > > @@ -69,6 +69,17 @@ do {						\
> > > >  			current->irq_config = 0;	\
> > > >  	  } while (0)
> > > >  
> > > > +# define lockdep_irq_work_enter(__work)					\
> > > > +	  do {								\
> > > > +		  if (!(atomic_read(&__work->flags) & IRQ_WORK_HARD_IRQ))\
> > > > +			current->irq_config = 1;			\
> > > 
> > > So, irq_config == 1 means we are in a softirq? Are there other values for
> > > irq_config? In which case there should be enums or something?
> > > I can't find the patch that describes this.
> > 
> > 0 means as-is, 1 means threaded / sleeping locks are okay.
> 
> So that's the kind of comment we need :-)
> 
> Also how about current->irq_locking instead?
> 
> And something like:
> 
> enum {
>     IRQ_LOCKING_NO_SLEEP,
>     IRQ_LOCKING_CAN_SLEEP
> }

Or current->irq_preemptible

enum {
    IRQ_NEVER_PREEMPTIBLE,
    IRQ_MAYBE_PREEMPTIBLE
}

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ