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:   Thu, 20 Feb 2020 16:26:16 -0800
From:   "Paul E. McKenney" <paulmck@...nel.org>
To:     Qais Yousef <qais.yousef@....com>
Cc:     Thomas Gleixner <tglx@...utronix.de>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Davidlohr Bueso <dave@...olabs.net>,
        Josh Triplett <josh@...htriplett.org>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 12/14] torture: Replace cpu_up/down with
 device_online/offline

On Thu, Feb 20, 2020 at 03:31:59PM +0000, Qais Yousef wrote:
> On 11/29/19 12:38, Paul E. McKenney wrote:
> > On Fri, Nov 29, 2019 at 09:13:45AM +0000, Qais Yousef wrote:
> > > On 11/28/19 13:02, Paul E. McKenney wrote:
> > > > On Thu, Nov 28, 2019 at 05:00:26PM +0000, Qais Yousef wrote:
> > > > > On 11/28/19 16:56, Qais Yousef wrote:
> > > > > > On 11/27/19 13:47, Paul E. McKenney wrote:
> > > > > > > On Mon, Nov 25, 2019 at 11:27:52AM +0000, Qais Yousef wrote:
> > > > > > > > The core device API performs extra housekeeping bits that are missing
> > > > > > > > from directly calling cpu_up/down.
> > > > > > > > 
> > > > > > > > See commit a6717c01ddc2 ("powerpc/rtas: use device model APIs and
> > > > > > > > serialization during LPM") for an example description of what might go
> > > > > > > > wrong.
> > > > > > > > 
> > > > > > > > This also prepares to make cpu_up/down a private interface for anything
> > > > > > > > but the cpu subsystem.
> > > > > > > > 
> > > > > > > > Signed-off-by: Qais Yousef <qais.yousef@....com>
> > > > > > > > CC: Davidlohr Bueso <dave@...olabs.net>
> > > > > > > > CC: "Paul E. McKenney" <paulmck@...nel.org>
> > > > > > > > CC: Josh Triplett <josh@...htriplett.org>
> > > > > > > > CC: linux-kernel@...r.kernel.org
> > > > > > > 
> > > > > > > Looks fine from an rcutorture viewpoint, but why not provide an API
> > > > > > > that pulled lock_device_hotplug() and unlock_device_hotplug() into the
> > > > > > > online/offline calls?
> > > > > > 
> > > > > > I *think* the right way to do what you say is by doing lock_device_hotplug()
> > > > > > inside device_{online, offline}() - which affects all drivers not just the CPU.
> > > > 
> > > > Or there could be a CPU-specific wrapper function that did the needed
> > > > locking.  (Whether this is worth it or not of course depends on the
> > > > number of invocations.)
> > > 
> > > Okay I see what you mean now. driver/base/memory.c have {add,remove}_memory()
> > > that does what you say. I think we can replicate this in driver/base/cpu.c too.
> > > 
> > > I can certainly do that, better as an improvement on top as I need to audit the
> > > code to make sure the critical sections weren't relying on this lock to protect
> > > something else beside the online/offline operation.
> > 
> > Works for me!
> 
> I'm taking that as reviewed-by, which I'll add to v3. Please shout if you still
> need to have a look further.
> 
> Once this is taken I'll add the suggested API!

OK, I will bite...

Why not right now?

							Thanx, Paul

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ