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: <200709281705.18304.rjw@sisk.pl>
Date:	Fri, 28 Sep 2007 17:05:17 +0200
From:	"Rafael J. Wysocki" <rjw@...k.pl>
To:	Mark Lord <lkml@....ca>
Cc:	Len Brown <lenb@...nel.org>,
	Linux Kernel <linux-kernel@...r.kernel.org>,
	simon.derr@...l.net
Subject: Re: [PATCH] disable non-boot CPUs before poweroff

On Friday, 28 September 2007 15:52, Mark Lord wrote:
> 
> We need to disable all CPUs other than the boot CPU (usually 0)
> before attempting to power-off modern SMP machines.
> This seems to fix the hang-on-poweroff issue
> that one of my SMP boxes exhibits.  More testing required.
> 
> Signed-off-by: Mark Lord <mlord@...ox.com>
> ---
> 
> --- linux/kernel/sys.c.orig	2007-09-13 09:49:11.000000000 -0400
> +++ linux/kernel/sys.c	2007-09-28 09:48:54.000000000 -0400
> @@ -32,6 +32,7 @@
>  #include <linux/getcpu.h>
>  #include <linux/task_io_accounting_ops.h>
>  #include <linux/seccomp.h>
> +#include <linux/cpu.h>
>  
>  #include <linux/compat.h>
>  #include <linux/syscalls.h>
> @@ -879,6 +880,7 @@
>  	if (pm_power_off_prepare)
>  		pm_power_off_prepare();
>  	sysdev_shutdown();
> +	disable_nonboot_cpus();

Before sysdev_shutdown(), please.

sysdev_shutdown() may touch things that belong to CPU0.

>  	printk(KERN_EMERG "Power down.\n");
>  	machine_power_off();
>  }

Greetings,
Rafael
-
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