<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/power, branch v2.6.14.1</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/kernel/power?h=v2.6.14.1</id>
<link rel='self' href='https://git.amat.us/linux/atom/kernel/power?h=v2.6.14.1'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2005-10-10T15:36:46Z</updated>
<entry>
<title>[PATCH] x86_64: Set up safe page tables during resume</title>
<updated>2005-10-10T15:36:46Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2005-10-09T19:19:40Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3dd083255ddcfa87751fa8e32f61a9547a15a541'/>
<id>urn:sha1:3dd083255ddcfa87751fa8e32f61a9547a15a541</id>
<content type='text'>
The following patch makes swsusp avoid the possible temporary corruption
of page translation tables during resume on x86-64.  This is achieved by
creating a copy of the relevant page tables that will not be modified by
swsusp and can be safely used by it on resume.

The problem is that during resume on x86-64 swsusp may temporarily
corrupt the page tables used for the direct mapping of RAM.  If that
happens, a page fault occurs and cannot be handled properly, which leads
to the solid hang of the affected system.  This leads to the loss of the
system's state from before suspend and may result in the loss of data or
the corruption of filesystems, so it is a serious issue.  Also, it
appears to happen quite often (for me, as often as 50% of the time).

The problem is related to the fact that (at least) one of the PMD
entries used in the direct memory mapping (starting at PAGE_OFFSET)
points to a page table the physical address of which is much greater
than the physical address of the PMD entry itself.  Moreover,
unfortunately, the physical address of the page table before suspend
(i.e.  the one stored in the suspend image) happens to be different to
the physical address of the corresponding page table used during resume
(i.e.  the one that is valid right before swsusp_arch_resume() in
arch/x86_64/kernel/suspend_asm.S is executed).  Thus while the image is
restored, the "offending" PMD entry gets overwritten, so it does not
point to the right physical address any more (i.e.  there's no page
table at the address pointed to by it, because it points to the address
the page table has been at during suspend).  Consequently, if the PMD
entry is used later on, and it _is_ used in the process of copying the
image pages, a page fault occurs, but it cannot be handled in the normal
way and the system hangs.

In principle we can call create_resume_mapping() from
swsusp_arch_resume() (ie.  from suspend_asm.S), but then the memory
allocations in create_resume_mapping(), resume_pud_mapping(), and
resume_pmd_mapping() must be made carefully so that we use _only_
NosaveFree pages in them (the other pages are overwritten by the loop in
swsusp_arch_resume()).  Additionally, we are in atomic context at that
time, so we cannot use GFP_KERNEL.  Moreover, if one of the allocations
fails, we should free all of the allocated pages, so we need to trace
them somehow.

All of this is done in the appended patch, except that the functions
populating the page tables are located in arch/x86_64/kernel/suspend.c
rather than in init.c.  It may be done in a more elegan way in the
future, with the help of some swsusp patches that are in the works now.

[AK: move some externs into headers, renamed a function]

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Signed-off-by: Andi Kleen &lt;ak@suse.de&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] swsusp: avoid problems if there are too many pages to save</title>
<updated>2005-09-28T14:46:41Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2005-09-28T04:45:43Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=0f7347c20c410c300be0db4c132945fd02e54110'/>
<id>urn:sha1:0f7347c20c410c300be0db4c132945fd02e54110</id>
<content type='text'>
The following patch makes swsusp avoid problems during resume if there are
too many pages to save on suspend.  It adds a constant that allows us to
verify if we are going to save too many pages and implements the check
(this is done as early as we can tell that the check will trigger, which is
in swsusp_alloc()).

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Acked-by: Pavel Machek &lt;pavel@suse.cz&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] swsusp: prevent possible memory leak</title>
<updated>2005-09-28T14:46:40Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2005-09-28T04:45:32Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f2d613799af915da1fd78463ba8ec5086a0d6f92'/>
<id>urn:sha1:f2d613799af915da1fd78463ba8ec5086a0d6f92</id>
<content type='text'>
Prevent swsusp from leaking some memory in case of an error in
read_pagedir().  It also prevents the BUG_ON() from triggering if there's
an error while reading swap.

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Acked-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] swsusp: remove wrong code from data_free</title>
<updated>2005-09-28T14:46:40Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2005-09-28T04:45:31Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=254b54771cc4c00002f796be65d2885191dca9dc'/>
<id>urn:sha1:254b54771cc4c00002f796be65d2885191dca9dc</id>
<content type='text'>
The following patch removes some wrong code from the data_free() function
in swsusp.

This function could only be called if there's an error while writing the
suspend image to swap, so it is not triggered easily.  However, if
triggered, it would probably corrupt some memory.

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Acked-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] swsusp: fix comments</title>
<updated>2005-09-23T05:17:36Z</updated>
<author>
<name>Pavel Machek</name>
<email>pavel@ucw.cz</email>
</author>
<published>2005-09-23T04:44:11Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8686bcd0a5f5e3f599ed9f1028ec9e449e7b87e3'/>
<id>urn:sha1:8686bcd0a5f5e3f599ed9f1028ec9e449e7b87e3</id>
<content type='text'>
Fix comments in swsusp.

Signed-off-by: Pavel Machek &lt;pavel@suse.cz&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] swsusp: do not trigger BUG_ON() if there is not enough memory</title>
<updated>2005-09-23T05:17:35Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2005-09-23T04:44:01Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=57487f4376e16558ccbe45a5b41d8cb5192309a4'/>
<id>urn:sha1:57487f4376e16558ccbe45a5b41d8cb5192309a4</id>
<content type='text'>
The following patch makes swsusp avoid triggering the BUG_ON() in
swsusp_suspend() if there is not enough memory for suspend.

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Cc: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] SOFTWARE_SUSPEND needs HOTPLUG_CPU on SMP</title>
<updated>2005-09-23T05:17:34Z</updated>
<author>
<name>Randy Dunlap</name>
<email>rdunlap@xenotime.net</email>
</author>
<published>2005-09-23T04:43:56Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=720b9429e8f41f7c4ee9df293403650905042035'/>
<id>urn:sha1:720b9429e8f41f7c4ee9df293403650905042035</id>
<content type='text'>
Signed-off-by: Randy Dunlap &lt;rdunlap@xenotime.net&gt;
Acked-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] suspend: cleanup calling of power off methods.</title>
<updated>2005-09-23T05:17:33Z</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2005-09-23T04:43:46Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=88d10bbaaec38856f913313b6c0858d9e9b7a066'/>
<id>urn:sha1:88d10bbaaec38856f913313b6c0858d9e9b7a066</id>
<content type='text'>
In the lead up to 2.6.13 I fixed a large number of reboot problems by
making the calling conventions consistent.  Despite checking and double
checking my work it appears I missed an obvious one.

The S4 suspend code for PM_DISK_PLATFORM was also calling device_shutdown
without setting system_state, and was not calling the appropriate
reboot_notifier.

This patch fixes the bug by replacing the call of device_suspend with
kernel_poweroff_prepare.

Various forms of this failure have been fixed and tracked for a while.

Thanks for tracking this down go to: Alexey Starikovskiy, Meelis Roos
&lt;mroos@linux.ee&gt;, Nigel Cunningham &lt;ncunningham@cyclades.com&gt;, Pierre
Ossman &lt;drzeus-list@drzeus.cx&gt;

History of this bug is at:
http://bugme.osdl.org/show_bug.cgi?id=4320

Signed-off-by: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>Merge linux-2.6 with linux-acpi-2.6</title>
<updated>2005-09-08T05:45:47Z</updated>
<author>
<name>Len Brown</name>
<email>len.brown@intel.com</email>
</author>
<published>2005-09-08T05:45:47Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=64e47488c913ac704d465a6af86a26786d1412a5'/>
<id>urn:sha1:64e47488c913ac704d465a6af86a26786d1412a5</id>
<content type='text'>
</content>
</entry>
<entry>
<title>[PATCH] introduce and use kzalloc</title>
<updated>2005-09-07T23:57:45Z</updated>
<author>
<name>Pekka J Enberg</name>
<email>penberg@cs.Helsinki.FI</email>
</author>
<published>2005-09-06T22:18:31Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=dd3927105b6f65afb7dac17682172cdfb86d3f00'/>
<id>urn:sha1:dd3927105b6f65afb7dac17682172cdfb86d3f00</id>
<content type='text'>
This patch introduces a kzalloc wrapper and converts kernel/ to use it.  It
saves a little program text.

Signed-off-by: Pekka Enberg &lt;penberg@cs.helsinki.fi&gt;
Signed-off-by: Adrian Bunk &lt;bunk@stusta.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
</feed>
