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]
Message-ID: <20250630132654.GN1613376@noisy.programming.kicks-ass.net>
Date: Mon, 30 Jun 2025 15:26:54 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>
Cc: Ricardo Neri <ricardo.neri-calderon@...ux.intel.com>, x86@...nel.org,
	Krzysztof Kozlowski <krzk+dt@...nel.org>,
	Conor Dooley <conor+dt@...nel.org>, Rob Herring <robh@...nel.org>,
	"K. Y. Srinivasan" <kys@...rosoft.com>,
	Haiyang Zhang <haiyangz@...rosoft.com>,
	Wei Liu <wei.liu@...nel.org>, Dexuan Cui <decui@...rosoft.com>,
	Michael Kelley <mhklinux@...look.com>,
	"Rafael J. Wysocki" <rafael@...nel.org>,
	Saurabh Sengar <ssengar@...ux.microsoft.com>,
	Chris Oo <cho@...rosoft.com>, linux-hyperv@...r.kernel.org,
	devicetree@...r.kernel.org, linux-acpi@...r.kernel.org,
	linux-kernel@...r.kernel.org, Ricardo Neri <ricardo.neri@...el.com>,
	Yunhong Jiang <yunhong.jiang@...ux.intel.com>
Subject: Re: [PATCH v5 02/10] x86/acpi: Move acpi_wakeup_cpu() and helpers to
 smpwakeup.c

On Mon, Jun 30, 2025 at 03:07:08PM +0300, Kirill A. Shutemov wrote:
> On Mon, Jun 30, 2025 at 01:03:16PM +0200, Peter Zijlstra wrote:
> > On Fri, Jun 27, 2025 at 08:35:08PM -0700, Ricardo Neri wrote:
> > 
> > > -	/*
> > > -	 * Wait for the CPU to wake up.
> > > -	 *
> > > -	 * The CPU being woken up is essentially in a spin loop waiting to be
> > > -	 * woken up. It should not take long for it wake up and acknowledge by
> > > -	 * zeroing out ->command.
> > > -	 *
> > > -	 * ACPI specification doesn't provide any guidance on how long kernel
> > > -	 * has to wait for a wake up acknowledgment. It also doesn't provide
> > > -	 * a way to cancel a wake up request if it takes too long.
> > > -	 *
> > > -	 * In TDX environment, the VMM has control over how long it takes to
> > > -	 * wake up secondary. It can postpone scheduling secondary vCPU
> > > -	 * indefinitely. Giving up on wake up request and reporting error opens
> > > -	 * possible attack vector for VMM: it can wake up a secondary CPU when
> > > -	 * kernel doesn't expect it. Wait until positive result of the wake up
> > > -	 * request.
> > > -	 */
> > > -	while (READ_ONCE(acpi_mp_wake_mailbox->command))
> > > -		cpu_relax();
> > > -
> > > -	return 0;
> > > -}
> > 
> > > +	while (READ_ONCE(acpi_mp_wake_mailbox->command))
> > > +		cpu_relax();
> > > +
> > > +	return 0;
> > > +}
> > 
> > So I realize this is just code movement at this point, but this will
> > hard lockup the machine if the AP doesn't come up, right?
> 
> Correct.
> 
> > IIRC we have some timeout in the regular SIPI bringup if the AP doesn't
> > respond.
> 
> See the comment.

Doh, reading hard ;-) Thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ