Skip to contentSkip to conversation

swsusp: documentation fixes

PATCH Pavel Machek 4 participants 5 messages Dec 16, 2005 – Dec 18, 2005

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Documentation and printk updates. Document "modular SATA" trap.

---
commit bd607a6d78db651cf6e4b199eae3476f4c935db6 tree 5a781c7cfcfb78a3d3cab2c518ea00bf46ab6e6f parent 45a5301637600fc7e517c3308e957b3fac7cfd86 author <pavel@amd.(none)> Fri, 16 Dec 2005 11:45:58 +0100 committer <pavel@amd.(none)> Fri, 16 Dec 2005 11:45:58 +0100

 Documentation/power/swsusp.txt |   18 +++++++++++-------
 Documentation/power/video.txt  |    1 +
 kernel/power/swsusp.c          |    2 +-
 3 files changed, 13 insertions(+), 8 deletions(-)
Documentation/power/swsusp.txt +11 -7
@@ -27,13 +27,11 @@ echo shutdown > /sys/power/disk; echo di
 
 echo platform > /sys/power/disk; echo disk > /sys/power/state
 
-
-Encrypted suspend image:
-------------------------
-If you want to store your suspend image encrypted with a temporary
-key to prevent data gathering after resume you must compile
-crypto and the aes algorithm into the kernel - modules won't work
-as they cannot be loaded at resume time.
+. If you have SATA disks, you'll need recent kernels with SATA suspend
+support. For suspend and resume to work, make sure your disk drivers
+are built into kernel -- not modules. [There's way to make
+suspend/resume with modular disk drivers, see FAQ, but you should
+better not do that.]
 
 
 Article about goals and implementation of Software Suspend for Linux
@@ -328,4 +326,10 @@ init=/bin/bash, then swapon and starting
 usually does the trick. Then it is good idea to try with latest
 vanilla kernel.
 
+Q: How can RH ship a swsusp-supporting kernel with modular SATA
+drivers?
 
+A: Well, it can be done, load the drivers, then do echo into resume
+file from initrd. Be sure not to mount anything, not even read-only
+mount, or you are going to loose your filesystem same way Dave Jones
+did.
Documentation/power/video.txt +1 -0
@@ -132,6 +132,7 @@ Sony Vaio PCG-F403		??? (*)
 Sony Vaio PCG-N505SN		??? (*)
 Sony Vaio PCG-GRT995MP		none (1), works with 'nv' X driver
 Sony Vaio vgn-s260		X or boot-radeon can init it (5)
+Sony Vaio vgn-S580BH		vga=normal, but suspend from X. Console will be blank unless you return to X. 
 Sony Vaio vgn-FS115B		s3_bios (2),s3_mode (4)
 Toshiba Libretto L5		none (1)
 Toshiba Portege 3020CT		s3_mode (3)
kernel/power/swsusp.c +1 -1
@@ -988,7 +988,7 @@ int swsusp_check(void)
 	if (!error)
 		pr_debug("swsusp: resume file found\n");
 	else
-		pr_debug("swsusp: Error %d check for resume file\n", error);
+		pr_debug("swsusp: Error %d checking for resume file (are your disk drivers built-in?)\n", error);
 	return error;
 }
 
Signature · 1 line
Thanks, Sharp!
#1 lore raw

Hi.

Quoted 39 lines · Pavel Machek

Documentation and printk updates. Document "modular SATA" trap.

---
commit bd607a6d78db651cf6e4b199eae3476f4c935db6 tree 5a781c7cfcfb78a3d3cab2c518ea00bf46ab6e6f parent 45a5301637600fc7e517c3308e957b3fac7cfd86 author <pavel@amd.(none)> Fri, 16 Dec 2005 11:45:58 +0100 committer <pavel@amd.(none)> Fri, 16 Dec 2005 11:45:58 +0100

 Documentation/power/swsusp.txt |   18 +++++++++++-------
 Documentation/power/video.txt  |    1 +
 kernel/power/swsusp.c          |    2 +-
 3 files changed, 13 insertions(+), 8 deletions(-)
Documentation/power/swsusp.txt +5 -7
@@ -27,13 +27,11 @@ echo shutdown > /sys/power/disk; echo di
 
 echo platform > /sys/power/disk; echo disk > /sys/power/state
 
-
-Encrypted suspend image:
-------------------------
-If you want to store your suspend image encrypted with a temporary
-key to prevent data gathering after resume you must compile
-crypto and the aes algorithm into the kernel - modules won't work
-as they cannot be loaded at resume time.
+. If you have SATA disks, you'll need recent kernels with SATA suspend
+support. For suspend and resume to work, make sure your disk drivers
+are built into kernel -- not modules. [There's way to make
+suspend/resume with modular disk drivers, see FAQ, but you should
+better not do that.]
 
 
 Article about goals and implementation of Software Suspend for Linux

Documentation/power/swsusp.txt init=/bin/bash, then swapon and starting · line 335

Quoted 10 lines
Documentation/power/swsusp.txt +6 -0
@@ -328,4 +326,10 @@ init=/bin/bash, then swapon and starting
 usually does the trick. Then it is good idea to try with latest
 vanilla kernel.
 
+Q: How can RH ship a swsusp-supporting kernel with modular SATA
+drivers?
 
+A: Well, it can be done, load the drivers, then do echo into resume
+file from initrd. Be sure not to mount anything, not even read-only
+mount, or you are going to loose your filesystem same way Dave Jones
+did.

Quick solution to this - store the root filesystem's dev_t in the image header. If it's mounted when doing the sanity check, refuse to resume.

Regards,

Nigel

Quoted 23 lines
Documentation/power/video.txt +1 -0
@@ -132,6 +132,7 @@ Sony Vaio PCG-F403		??? (*)
 Sony Vaio PCG-N505SN		??? (*)
 Sony Vaio PCG-GRT995MP		none (1), works with 'nv' X driver
 Sony Vaio vgn-s260		X or boot-radeon can init it (5)
+Sony Vaio vgn-S580BH		vga=normal, but suspend from X. Console will be blank unless you return to X. 
 Sony Vaio vgn-FS115B		s3_bios (2),s3_mode (4)
 Toshiba Libretto L5		none (1)
 Toshiba Portege 3020CT		s3_mode (3)
kernel/power/swsusp.c +1 -1
@@ -988,7 +988,7 @@ int swsusp_check(void)
 	if (!error)
 		pr_debug("swsusp: resume file found\n");
 	else
-		pr_debug("swsusp: Error %d check for resume file\n", error);
+		pr_debug("swsusp: Error %d checking for resume file (are your disk drivers built-in?)\n", error);
 	return error;
 }
 
#2 lore raw

Hi!

Quoted 7 lines
Quoted 7 lines
Documentation/power/swsusp.txt +2 -0
@@ -328,4 +326,10 @@ init=/bin/bash, then swapon and starting
 usually does the trick. Then it is good idea to try with latest
 vanilla kernel.
 
+Q: How can RH ship a swsusp-supporting kernel with modular SATA
+drivers?
 
Quoted 7 lines

Documentation/power/swsusp.txt init=/bin/bash, then swapon and starting · line 335

Quoted 4 lines
Documentation/power/swsusp.txt +4 -0
+A: Well, it can be done, load the drivers, then do echo into resume
+file from initrd. Be sure not to mount anything, not even read-only
+mount, or you are going to loose your filesystem same way Dave Jones
+did.

Quick solution to this - store the root filesystem's dev_t in the image header. If it's mounted when doing the sanity check, refuse to resume.

Yep, we could do that. But it is not 100% solution (you could have some non-root filesystem mounted, and corrupt that one), anyway, and I'd rather keep people from using it than complicating swsusp even more. u-swsusp is going to make this obsolete, anyway, and can do any sanity checks it wants to.
Pavel

Signature · 1 line
Thanks, Sharp!
#3 lore raw
In reply to Pavel Machek

Documentation/power/swsusp.txt init=/bin/bash, then swapon and starting · line 335

Quoted 7 lines · Pavel Machek
Documentation/power/swsusp.txt +6 -0
+Q: How can RH ship a swsusp-supporting kernel with modular SATA
+drivers?
 
+A: Well, it can be done, load the drivers, then do echo into resume
+file from initrd. Be sure not to mount anything, not even read-only
+mount, or you are going to loose your filesystem same way Dave Jones
+did.

I don't need the fame here thanks.
I've hit a thousand other ways to corrupt my rootfs, I don't think it's worth documenting them. It's arguable this whole item is needed to be documented, but if you feel compelled to write Red Hat specific documentation in the swsusp docs, feel free to note that 'make modules_install ; make install' just does the right thing, including building an initrd for you with all the right pieces.

Dave

#4 lore raw

Hi!

Quoted 15 lines

Documentation/power/swsusp.txt init=/bin/bash, then swapon and starting · line 335

Quoted 7 lines
Documentation/power/swsusp.txt +6 -0
+Q: How can RH ship a swsusp-supporting kernel with modular SATA
+drivers?
 
+A: Well, it can be done, load the drivers, then do echo into resume
+file from initrd. Be sure not to mount anything, not even read-only
+mount, or you are going to loose your filesystem same way Dave Jones
+did.

I don't need the fame here thanks.
I've hit a thousand other ways to corrupt my rootfs, I don't think it's worth documenting them. It's arguable this whole item is needed to be documented, but if you feel compelled to write Red Hat specific documentation in the swsusp docs, feel free to note that 'make modules_install ; make install' just does the right thing, including building an initrd for you with all the right pieces.

Sorry... This entry was originally real question from akpm, and I did reply for him. I should have rewritten in when I decided to put it into FAQ.

This should be better:

Q: How can distributions ship a swsusp-supporting kernel with modular disk drivers (especially SATA)?

A: Well, it can be done, load the drivers, then do echo into /sys/power/disk/resume file from initrd. Be sure not to mount anything, not even read-only mount, or you are going to loose your data.
Pavel

Signature · 1 line
Thanks, Sharp!