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]
Date:   Tue, 27 Jun 2017 10:23:09 -0700
From:   Brian Norris <briannorris@...omium.org>
To:     Thomas Gleixner <tglx@...utronix.de>,
        Linus Walleij <linus.walleij@...aro.org>
Cc:     Heiko Stuebner <heiko@...ech.de>,
        Linus Walleij <linus.walleij@...aro.org>,
        linux-rockchip@...ts.infradead.org,
        Julia Cartwright <julia@...com>,
        LKML <linux-kernel@...r.kernel.org>, linux-gpio@...r.kernel.org,
        John Keeping <john@...anate.com>, linux-pm@...r.kernel.org,
        Doug Anderson <dianders@...omium.org>,
        "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Tony Lindgren <tony@...mide.com>,
        "David.Wu" <david.wu@...k-chips.com>,
        '黄涛' <huangtao@...k-chips.com>
Subject: Re: [PATCH for 4.12] Revert "pinctrl: rockchip: avoid hardirq-unsafe
 functions in irq_chip"

Hi Linus,

I'm not sure I follow all of Thomas's suggestions on what should be done
in the future yet, but I agree that can be done in parallel:

On Tue, Jun 27, 2017 at 03:06:26PM +0200, Thomas Gleixner wrote:
> On Tue, 27 Jun 2017, Thomas Gleixner wrote:
> > That aside, looking at the commit which caused this discussion:
> > 
> > 88bb94216f59e pinctrl: rockchip: avoid hardirq-unsafe functions in irq_chip
> > 
> > I assume (the changelog lacks details) that the patch want's to avoid a
> > might sleep splat from the irq callbacks caused by the regmap spinlock,
> > which gets converted into a sleeping lock on RT. It does this by abusing
> > the irq_bus_lock() mechanism, which is wrong to begin with.
> > 
> > The only irq chip function which uses the regmap magic is the
> > irq_set_type() callback. Now, I have a hard time to understand (though I'm
> > no regmap/pinctrl expert) why that regmap stuff needs to be called in the
> > first place. The level and the polarity are programmed via:
> > 
> >         writel_relaxed(level, gc->reg_base + GPIO_INTTYPE_LEVEL);
> >         writel_relaxed(polarity, gc->reg_base + GPIO_INT_POLARITY);
> > 
> > Why needs the regmap machinery to be invoked there? The GPIO is already
> > muxed and configured as interrupt, otherwise none of the irq functions
> > could be invoked. Hmm?
> 
> That said, the commit should be reverted and the issue needs to analyzed
> proper. We still need the RCU -> SCRU conversion, but that's a different
> problem.

Can we consider this an "ack" for the $subject then? Heiko also gave his
approval. How can this get merged? It's running a bit late for 4.12,
though it really shouldn't be risky (at least for non-RT stuff that was
working warning-free already in 4.11), but a 4.13-rc1 with -stable tag
could work as well.

I suppose I didn't put a proper 'Fixes' tag (though it should be obvious
from the commit message), so here goes:

Fixes: 88bb94216f59 ("pinctrl: rockchip: avoid hardirq-unsafe functions in irq_chip")

Regards,
Brian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ