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-next>] [day] [month] [year] [list]
Date:	Wed, 29 Sep 2010 01:12:11 +0200
From:	"Rafael J. Wysocki" <rjw@...k.pl>
To:	"Linux-pm mailing list" <linux-pm@...ts.linux-foundation.org>
Cc:	"H. Peter Anvin" <hpa@...or.com>,
	LKML <linux-kernel@...r.kernel.org>,
	Nigel Cunningham <nigel@...onice.net>
Subject: [RFC][PATCH] PM / Hibernate / x86: Change RESTORE_MAGIC on x86_64

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

On x86_64 the configuration and version of the kernel that
hibernates and creates a system image may be different from the
configuration and version of the boot kernel that loads the image.
So long as both these kernels are built with the same value of
RESTORE_MAGIC, the image created by one of them should be
successfully loaded and restored by the other one.

It wasn't necessary to modify RESTORE_MAGIC in the past, but now
that we are adding compression to the in-kernel hibernate code,
change the value of RESTORE_MAGIC so that earlier kernels don't
try to load compressed images they can't handle.

Signed-off-by: Rafael J. Wysocki <rjw@...k.pl>
---
 arch/x86/power/hibernate_64.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6/arch/x86/power/hibernate_64.c
===================================================================
--- linux-2.6.orig/arch/x86/power/hibernate_64.c
+++ linux-2.6/arch/x86/power/hibernate_64.c
@@ -137,7 +137,7 @@ struct restore_data_record {
 	unsigned long magic;
 };
 
-#define RESTORE_MAGIC	0x0123456789ABCDEFUL
+#define RESTORE_MAGIC	0x0123456789ABCDF0UL
 
 /**
  *	arch_hibernation_header_save - populate the architecture specific part
--
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