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: <200607291427.01749.rjw@sisk.pl>
Date:	Sat, 29 Jul 2006 14:27:01 +0200
From:	"Rafael J. Wysocki" <rjw@...k.pl>
To:	Andrew Morton <akpm@...l.org>
Cc:	linux-kernel@...r.kernel.org, pavel@....cz,
	Nathan Lynch <ntl@...ox.com>
Subject: Re: [PATCH -mm][resend] Disable CPU hotplug during suspend

On Saturday 29 July 2006 07:15, Andrew Morton wrote:
> On Fri, 28 Jul 2006 10:15:29 +0200
> "Rafael J. Wysocki" <rjw@...k.pl> wrote:
> 
> > int disable_nonboot_cpus(void)
> > +{
> > +	int cpu, error = 0;
> > +
> > +	/* We take all of the non-boot CPUs down in one shot to avoid races
> > +	 * with the userspace trying to use the CPU hotplug at the same time
> > +	 */
> > +	mutex_lock(&cpu_add_remove_lock);
> > +	cpus_clear(frozen_cpus);
> > +	printk("Disabling non-boot CPUs ...\n");
> > +	for_each_online_cpu(cpu) {
> > +		if (cpu == 0)
> > +			continue;
> 
> This is presumably only called on cpu 0, yes?
> 
> How can we guarantee that, given that preemption is enabled?

If cpu 0 is online, it will end up running on it when all of the other cpus
are down.

> What happens if cpu 0 isn't online?

Fortunately, on x86_64 and i386 it cannot be offline (I'm not sure about ppc,
though), but of course in general we shouldn't assume that it's online or even
present here.

I'm discussing the issue with Nathan right now.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ