[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <258ca9c3dd8cd909ef4b3065ed6e935ccecc91cf.camel@infradead.org>
Date: Tue, 01 Feb 2022 13:02:51 +0000
From: David Woodhouse <dwmw2@...radead.org>
To: Borislav Petkov <bp@...en8.de>
Cc: Tom Lendacky <thomas.lendacky@....com>,
Thomas Gleixner <tglx@...utronix.de>,
Sean Christopherson <seanjc@...gle.com>,
Ingo Molnar <mingo@...hat.com>,
Dave Hansen <dave.hansen@...ux.intel.com>,
"x86@...nel.org" <x86@...nel.org>,
"H . Peter Anvin" <hpa@...or.com>,
Paolo Bonzini <pbonzini@...hat.com>,
"Paul E . McKenney" <paulmck@...nel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"kvm@...r.kernel.org" <kvm@...r.kernel.org>,
"rcu@...r.kernel.org" <rcu@...r.kernel.org>,
"mimoja@...oja.de" <mimoja@...oja.de>,
"hewenliang4@...wei.com" <hewenliang4@...wei.com>,
"hushiyuan@...wei.com" <hushiyuan@...wei.com>,
"luolongjun@...wei.com" <luolongjun@...wei.com>,
"hejingxian@...wei.com" <hejingxian@...wei.com>,
Joerg Roedel <joro@...tes.org>,
Andrew Cooper <andrew.cooper3@...rix.com>
Subject: Re: [PATCH v3 6/9] x86/smpboot: Support parallel startup of
secondary CPUs
On Tue, 2022-02-01 at 13:56 +0100, Borislav Petkov wrote:
> On Tue, Feb 01, 2022 at 12:39:17PM +0000, David Woodhouse wrote:
> > In the top of my git tree, you can see a half-baked 'parallel part 2'
> > commit which introduces a new x86/cpu:wait-init cpuhp state that would
> > invoke do_wait_cpu_initialized() for each CPU in turn, which *would*
> > release them all into load_ucode_bsp() at the same time and have
> > precisely the problem you're describing.
>
> The load_ucode_bsp() is the variant that runs on the boot CPU but
> yeah...
Right. Brain not fully online today. Sorry.
> > Hm, not sure I see how that's protecting itself from someone
> > simultaneously echoing 1 > /sys/devices/system/cpu/cpu${SIBLING}/online
>
> So
>
> echo 1 > ../online
>
> means onlining the sibling.
>
> But reload_store() grabs the CPU hotplug lock *first* and *then* runs
> check_online_cpus() to see if all CPUs are online. It doesn't do the
> update if even one CPU is missing. You can't offline any CPU for the
> duration of the update...
>
> So I guess you'd need to explain in more detail what protection hole
> you're seeing because I might be missing something here.
No, I'd just missed cpus_read_lock() because I was looking for
something else. My fault; it looks fine. Thanks.
Download attachment "smime.p7s" of type "application/pkcs7-signature" (5965 bytes)
Powered by blists - more mailing lists