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]
Date:	Sat, 5 May 2007 14:21:30 +0200
From:	"Rafael J. Wysocki" <rjw@...k.pl>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	Johannes Berg <johannes@...solutions.net>,
	LKML <linux-kernel@...r.kernel.org>, Pavel Machek <pavel@....cz>,
	Nigel Cunningham <nigel@...el.suspend2.net>,
	Pekka Enberg <penberg@...helsinki.fi>
Subject: Re: [PATCH -mm] PM: Separate hibernation code from suspend code

On Saturday, 5 May 2007 12:16, Rafael J. Wysocki wrote:
> On Saturday, 5 May 2007 08:31, Andrew Morton wrote:
> > On Fri, 4 May 2007 11:32:31 +0200 "Rafael J. Wysocki" <rjw@...k.pl> wrote:
> > 
> > > Separate the hibernation (aka suspend to disk code) from the other suspend code.
> > > In particular:
> > >  * Remove the definitions related to hibernation from include/linux/pm.h
> > >  * Introduce struct hibernation_ops and a new hibernate() function to hibernate
> > >    the system, defined in include/linux/suspend.h
> > >  * Separate suspend code in kernel/power/main.c from hibernation-related code
> > >    in kernel/power/disk.c and kernel/power/user.c (with the help of
> > >    hibernation_ops)
> > >  * Switch ACPI (the only user of pm_ops.pm_disk_mode) to hibernation_ops
> > 
> > This causes the long-suffering Vaio to fail to power off during suspend
> > to disk.  It says "Please power me down manually".
> 
> Hmm, looks like a failure of acpi_hibernation_enter().  Can you please put a
> printk() in there, after local_irq_restore()?

Anyway, we should power off the system rather than halt it if hibernation_ops
is not set.

---
From: Rafael J. Wysocki <rjw@...k.pl>

Power off the system instead of halting it if the 'platform' mode of hibernation
has been requested, but hibernation_ops is not set.

Signed-off-by: Rafael J. Wysocki <rjw@...k.pl>
---
 kernel/power/disk.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Index: linux-2.6.21/kernel/power/disk.c
===================================================================
--- linux-2.6.21.orig/kernel/power/disk.c	2007-05-05 12:24:33.000000000 +0200
+++ linux-2.6.21/kernel/power/disk.c	2007-05-05 13:51:45.000000000 +0200
@@ -99,9 +99,6 @@ static void power_down(void)
 	case HIBERNATION_TEST:
 	case HIBERNATION_TESTPROC:
 		break;
-	case HIBERNATION_SHUTDOWN:
-		kernel_power_off();
-		break;
 	case HIBERNATION_REBOOT:
 		kernel_restart(NULL);
 		break;
@@ -111,6 +108,9 @@ static void power_down(void)
 			hibernation_ops->enter();
 			break;
 		}
+	case HIBERNATION_SHUTDOWN:
+		kernel_power_off();
+		break;
 	}
 	kernel_halt();
 	/*
-
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