[PATCH] UBUNTU: SAUCE: dove: avoid page table overwrite when resuming from hibernation

Eric Miao eric.miao at canonical.com
Fri May 28 04:13:14 UTC 2010


Forget about upstream at this moment, since the hibernation support for Dove
is quite specific now, and even it's going to be supported in
upstream, it will have
to made generic so other SoC can benefit. This patch isn't ready for
upstream yet.

On Fri, May 28, 2010 at 7:39 AM, Nigel Cunningham
<ncunningham at crca.org.au> wrote:
> Hi Rafael.
>
> On 28/05/10 09:29, Rafael J. Wysocki wrote:
>>
>> On Thursday 27 May 2010, Nigel Cunningham wrote:
>>>
>>> Hi.
>>>
>>> On 28/05/10 01:35, Tim Gardner wrote:
>>>>
>>>> Test results in the LP report look good. Has this patch been upstreamed?
>>>> I cannot remember from the original discussions a few weeks ago.
>>>
>>> I noticed this thread last night and brought it to Rafael's attention,
>>> because I don't remember seeing anything like this before.
>>
>> I'm not sure what patch is being referred to.  Any details, please?
>
> Sorry - I thought I gave you the url to the bug report in my previous email.
>
> http://bugs.launchpad.net/bugs/509006
>
> To quote from the patch Ubuntu is applying:
>
> Resuming from hibernation is OK if 'resume=/dev/sdaX' is explicitly
> specified on the kernel command line, but it fails if scripts in
> initramfs are used to trigger the resume. It turned out to be page
> table being overwritten when restoring the memory content because
> it's using a normal user process's page table in the latter case,
> which is not safe and could be overwritten. Fix this by using the
> safe swapper_pg_dir during restoring.
>
> It's an arm specific fix (touching arch/arm/mach-dove/swsusp.S and the
> Makefile in the same directory) but I wondered whether this might in any way
> be relevant to vanilla. Perhaps there's something more generic, like a
> failure to set KERNEL_DS in that code path that might be a more correct fix
> and might also be relevant to other architectures. (Not that I've seen any
> failures with x86/x86_64) from an initramfs). Hmm - could be. I explicitly
> set KERNEL_DS in TuxOnIce, but don't see it done anywhere (from a quick
> check) in vanilla.
>
> Regards,
>
> Nigel
>




More information about the kernel-team mailing list