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: <20070410222009.GA26607@linux-os.sc.intel.com>
Date:	Tue, 10 Apr 2007 15:20:09 -0700
From:	Venki Pallipadi <venkatesh.pallipadi@...el.com>
To:	"Rafael J. Wysocki" <rjw@...k.pl>
Cc:	"Pallipadi, Venkatesh" <venkatesh.pallipadi@...el.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org, randy.dunlap@...cle.com,
	lenb@...nel.org, Adam Belay <abelay@...ell.com>
Subject: Re: 2.6.21-rc6-mm1

On Mon, Apr 09, 2007 at 07:40:52PM +0200, Rafael J. Wysocki wrote:
> On Monday, 9 April 2007 18:14, Pallipadi, Venkatesh wrote:
> > 
> > >-----Original Message-----
> > >From: Rafael J. Wysocki [mailto:rjw@...k.pl] 
> > >Sent: Monday, April 09, 2007 9:08 AM
> > >To: Andrew Morton
> > >Cc: linux-kernel@...r.kernel.org; randy.dunlap@...cle.com; 
> > >lenb@...nel.org; Pallipadi, Venkatesh
> > >Subject: Re: 2.6.21-rc6-mm1
> > >
> > >On Sunday, 8 April 2007 23:35, Andrew Morton wrote:
> > >> 
> > >> 
> > >ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2
> > >.6.21-rc6/2.6.21-rc6-mm1/
> > >> 
> > >> 
> > >> - Lots of x86 updates
> > >> 
> > >> - This is a 25MB diff against mainline, which is rather large.
> > >
> > >The cpuidle thing tends to hang my x86-64 machines on boot.
> > >
> > 
> > Hi Rafael,
> > 
> > At what point during boot does it hang?
> 
> When mounting the root filesystem.  It hangs completely, even the magic SysRq
> doesn't work
> 

Rafael: Below patch should fix the hang.
Len: Please include this patch in acpi-test.

Thanks,
Venki

Prevent hang on x86-64, when ACPI processor driver is added as a module on
a system that does not support C-states.

x86-64 expects all idle handlers to enable interrupts before returning from
idle handler. This is due to enter_idle(), exit_idle() races. Make
cpuidle_idle_call() confirm to this when there is no pm_idle_old.

Also, cpuidle look at the return values of attch_driver() and set
current_driver to NULL if attach fails on all CPUs.

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@...el.com>

Index: linux-2.6.21-rc6-mm1/drivers/cpuidle/cpuidle.c
===================================================================
--- linux-2.6.21-rc6-mm1.orig/drivers/cpuidle/cpuidle.c
+++ linux-2.6.21-rc6-mm1/drivers/cpuidle/cpuidle.c
@@ -43,6 +43,8 @@ static void cpuidle_idle_call(void)
 	if (dev->status != CPUIDLE_STATUS_DOIDLE) {
 		if (pm_idle_old)
 			pm_idle_old();
+		else
+			local_irq_enable();
 		return;
 	}
 
Index: linux-2.6.21-rc6-mm1/drivers/cpuidle/driver.c
===================================================================
--- linux-2.6.21-rc6-mm1.orig/drivers/cpuidle/driver.c
+++ linux-2.6.21-rc6-mm1/drivers/cpuidle/driver.c
@@ -107,11 +107,20 @@ int cpuidle_switch_driver(struct cpuidle
 	cpuidle_curr_driver = drv;
 
 	if (drv) {
+		int ret = 1;
 		list_for_each_entry(dev, &cpuidle_detected_devices, device_list)
-			cpuidle_attach_driver(dev);
-		if (cpuidle_curr_governor)
+			if (cpuidle_attach_driver(dev) == 0)
+				ret = 0;
+
+		/* If attach on all devices fail, switch to NULL driver */
+		if (ret)
+			cpuidle_curr_driver = NULL;
+
+		if (cpuidle_curr_driver && cpuidle_curr_governor) {
+			printk(KERN_INFO "cpuidle: using driver %s\n",
+					drv->name);
 			cpuidle_install_idle_handler();
-		printk(KERN_INFO "cpuidle: using driver %s\n", drv->name);
+		}
 	}
 
 	return 0;
-
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