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, 16 Apr 2019 11:31:23 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Dexuan Cui <decui@...rosoft.com>
Cc:     "tglx@...utronix.de" <tglx@...utronix.de>,
        "riel@...riel.com" <riel@...riel.com>,
        "jpoimboe@...hat.com" <jpoimboe@...hat.com>,
        "luto@...nel.org" <luto@...nel.org>,
        Stephen Hemminger <sthemmin@...rosoft.com>,
        Sasha Levin <Alexander.Levin@...rosoft.com>,
        Haiyang Zhang <haiyangz@...rosoft.com>,
        KY Srinivasan <kys@...rosoft.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Michael Kelley <mikelley@...rosoft.com>,
        "marcelo.cerri@...onical.com" <marcelo.cerri@...onical.com>,
        "apw@...onical.com" <apw@...onical.com>,
        "olaf@...fle.de" <olaf@...fle.de>, vkuznets <vkuznets@...hat.com>,
        "jasowang@...hat.com" <jasowang@...hat.com>
Subject: Re: [PATCH] smp: Do not warn if smp_call_function_single() is doing
 a self call.

On Mon, Apr 15, 2019 at 11:39:57PM +0000, Dexuan Cui wrote:
> > From: Peter Zijlstra <peterz@...radead.org>
> > Sent: Monday, April 15, 2019 5:21 AM
> > To: Dexuan Cui <decui@...rosoft.com>
> > 
> > On Fri, Apr 12, 2019 at 11:53:57PM +0000, Dexuan Cui wrote:
> > > If smp_call_function_single() is calling the function for itself, it's safe
> > > to run with irqs_disabled() == true.
> > >
> > > I hit the warning because I'm in the below path in the .suspend callback of
> > > a "syscore_ops" to support hibernation for a VM running on Hyper-V:
> > >
> > >   hv_synic_cleanup() ->
> > >     clockevents_unbind_device() ->
> > >       clockevents_unbind() ->
> > >         smp_call_function_single().
> > >
> > > When the .suspend callback runs, only CPU0 is online and irqs_disabled() is
> > > true.
> > 
> > Pray tell, how well do you think mutex_lock() works with interrupts
> > disabled?
> 
> Good point. I realized generally speaking this patch makes no sense, so let me
> try the solution proposed by Vitaly, i.e. fix clockevents_unbind() instead.

That's still not the problem. You're calling clockevents_unbind_device()
with IRQs disabled, that's not correct. It doesn't matter what
clockevents_unbind() does thereafter.

You simply cannot do any of this with IRQs disabled, end of story.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ