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: <20200323161427.GB5755@lenoir>
Date:   Mon, 23 Mar 2020 17:14:28 +0100
From:   Frederic Weisbecker <frederic@...nel.org>
To:     Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc:     Peter Zijlstra <peterz@...radead.org>,
        LKML <linux-kernel@...r.kernel.org>,
        "Paul E . McKenney" <paulmck@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [RFC PATCH 2/3] lockdep: Merge hardirq_threaded and irq_config
 together

On Mon, Mar 23, 2020 at 03:53:14PM +0100, Sebastian Andrzej Siewior wrote:
> On 2020-03-23 15:02:20 [+0100], Peter Zijlstra wrote:
> > On Mon, Mar 23, 2020 at 04:32:06AM +0100, Frederic Weisbecker wrote:
> > > These fields describe the same state: a code block running in hardirq
> > > that might be threaded under specific configurations.
> > > 
> > > Merge them together in the same field. Also rename the result as
> > > "hardirq_threadable" as we are talking about a possible state and not
> > > an actual one.
> > 
> > What isn't instantly obvious is that they cannot overlap. For instance
> > mainline with force threaded interrupt handlers on, can't that have the
> > irq_work nest inside a threaded handler ?
> 
> I remember we kept them due to the nesting. A threaded-interrupt can be
> interrupted by irq_work/hrtimer/posix-timer. 
> So in a threaded interrupt it is okay to use a sleeping lock. It is not
> okay with irq_work on-top - unless it is the non-atomic one.

Hmm, with the current layout which is:

    if (curr->hardirq_threaded || curr->irq_config)
        curr_inner = LD_WAIT_CONFIG;
    else
        curr_inner = LD_WAIT_SPIN;

you are not protected against that.

But anyway none of that should happen if hardirq_threaded and irq_config
are respectively only used when hardirq threads are disabled and irq_work
is always hardirq, right?

> 
> > I *think* it just about works out, but it definitely wants a little more
> > than this.
> 
> Sebastian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ