Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1415826

Re: [PATCH][RFC] x86, hotplug: Use zero page for monitor when resuming from hibernation

From Pavel Machek <pavel@ucw.cz>
Newsgroups linux.kernel
Subject Re: [PATCH][RFC] x86, hotplug: Use zero page for monitor when resuming from hibernation
Date 2016-06-07 10:10 +0200
Message-ID <rHkff-6M-31@gated-at.bofh.it> (permalink)
References <rH3xN-62c-75@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon 2016-06-06 22:19:09, Chen Yu wrote:
> Stress test from Varun Koyyalagunta reports that, the
> nonboot CPU would hang occasionally, when resuming from
> hibernation. Further investigation shows that, the precise
> phase when nonboot CPU hangs, is the time when the nonboot
> CPU been woken up incorrectly, and tries to monitor the
> mwait_ptr for the second time, then an exception is
> triggered due to illegal vaddr access, say, something like,
> 'Unable to handler kernel address of 0xffff8800ba800010...'
> 
> One of the possible scenarios for this issue is illustrated below,
> when the boot CPU tries to resume from hibernation:
> 1. puts the nonboot CPUs offline, so the nonboot CPUs are monitoring
>    at the address of the task_struct.flags.
> 2. boot CPU copies pages to their original address, which includes
>    task_struct.flags, thus wakes up one of the nonboot CPUs.
> 3. nonboot CPU tries to monitor the task_struct.flags again, but since
>    the page table for task_struct.flags has been overwritten by
>    boot CPU, and there is probably a changed across hibernation
>    (because of inconsistence of e820 memory map), an exception is
>    triggered.

If memory map changes between suspend and resume, there'll be fun. If
that's suspected, should we attach md5 sum of e820 to the hibernation
image?

I doubt mwait fix is enough to catch everything in that case...

Best regards,
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH][RFC] x86, hotplug: Use zero page for monitor when resuming from hibernation Chen Yu <yu.c.chen@intel.com> - 2016-06-06 16:20 +0200
  Re: [PATCH][RFC] x86, hotplug: Use zero page for monitor when  resuming from hibernation Peter Zijlstra <peterz@infradead.org> - 2016-06-06 16:30 +0200
    RE: [PATCH][RFC] x86, hotplug: Use zero page for monitor when  resuming from hibernation "Chen, Yu C" <yu.c.chen@intel.com> - 2016-06-06 18:00 +0200
      Re: [PATCH][RFC] x86, hotplug: Use zero page for monitor when  resuming from hibernation Peter Zijlstra <peterz@infradead.org> - 2016-06-06 18:50 +0200
        Re: [PATCH][RFC] x86, hotplug: Use zero page for monitor when  resuming from hibernation Brian Gerst <brgerst@gmail.com> - 2016-06-06 19:40 +0200
        Re: [PATCH][RFC] x86, hotplug: Use zero page for monitor when  resuming from hibernation "H. Peter Anvin" <hpa@zytor.com> - 2016-06-06 23:10 +0200
  Re: [PATCH][RFC] x86, hotplug: Use zero page for monitor when  resuming from hibernation Pavel Machek <pavel@ucw.cz> - 2016-06-07 10:10 +0200
    Re: [PATCH][RFC] x86, hotplug: Use zero page for monitor when  resuming from hibernation Chen Yu <yu.c.chen@intel.com> - 2016-06-07 10:40 +0200
      Re: [PATCH][RFC] x86, hotplug: Use zero page for monitor when  resuming from hibernation Borislav Petkov <bp@suse.de> - 2016-06-07 11:20 +0200
        Re: [PATCH][RFC] x86, hotplug: Use zero page for monitor when  resuming from hibernation Chen Yu <yu.c.chen@intel.com> - 2016-06-07 11:40 +0200

csiph-web