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]
Date:   Tue, 12 Dec 2017 11:36:02 -0800
From:   "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To:     Russell King - ARM Linux <linux@...linux.org.uk>
Cc:     linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        Peng Fan <van.freenix@...il.com>,
        Fabio Estevam <fabio.estevam@....com>,
        Ingo Molnar <mingo@...nel.org>,
        "Peter Zijlstra (Intel)" <peterz@...radead.org>,
        Michal Hocko <mhocko@...e.com>,
        Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH] ARM: CPU hotplug: Delegate complete() to surviving CPU

On Tue, Dec 12, 2017 at 05:37:59PM +0000, Russell King - ARM Linux wrote:
> On Tue, Dec 12, 2017 at 09:20:59AM -0800, Paul E. McKenney wrote:
> > The ARM implementation of arch_cpu_idle_dead() invokes complete(), but
> > does so after RCU has stopped watching the outgoing CPU, which results
> > in lockdep complaints because complete() invokes functions containing RCU
> > readers.  This patch therefore uses Thomas Gleixner's trick of delegating
> > the complete() call to a surviving CPU via smp_call_function_single().
> > 
> > Reported-by: Peng Fan <van.freenix@...il.com>
> > Reported-by: Russell King - ARM Linux <linux@...linux.org.uk>
> > Signed-off-by: Paul E. McKenney <paulmck@...ux.vnet.ibm.com>
> > Tested-by: Tested-by: Fabio Estevam <fabio.estevam@....com>
> > Cc: Russell King <linux@...linux.org.uk>
> > Cc: Ingo Molnar <mingo@...nel.org>
> > Cc: "Peter Zijlstra (Intel)" <peterz@...radead.org>
> > Cc: Michal Hocko <mhocko@...e.com>
> > Cc: Thomas Gleixner <tglx@...utronix.de>
> > Cc: <linux-arm-kernel@...ts.infradead.org>
> 
> As I just described in response to Fabio's testing, this doesn't solve
> anything if CONFIG_BL_SWITCHER is enabled.  We could lose the unlock of
> a spinlock in the GIC code for sending the IPI.  As I already said
> previously in our discussion (but I guess you just don't believe me):

Sorry, Russell, but most days I don't even believe myself.  So it is
nothing personal, just one of the occupational hazards of being me.

> "2. there's some optional locking in the GIC driver that cause problems
>    for the cpu dying path.
> 
> The concensus last time around was that the IPI solution is a non-
> starter, so the seven year proven-reliable solution (disregarding the
> RCU warning) persists because I don't think anyone came up with a
> better solution."
> 
> Using smp_call_function_single() invokes the IPI paths.

OK, another approach is to have the dying CPU simply set an in-memory
flag, which a surviving CPU polls for.  There are of course any number
of ways of doing the polling loop.

So what bad thing happens when you use that approach?

							Thanx, Paul

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ