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-prev] [day] [month] [year] [list]
Message-ID: <36DF59CE26D8EE47B0655C516E9CE6402878091B@shsmsx102.ccr.corp.intel.com>
Date:	Wed, 13 Jul 2016 12:50:49 +0000
From:	"Chen, Yu C" <yu.c.chen@...el.com>
To:	"Rafael J. Wysocki" <rafael@...nel.org>
CC:	Linux PM <linux-pm@...r.kernel.org>, Pavel Machek <pavel@....cz>,
	"Len Brown" <lenb@...nel.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH][RFC v2] PM / hibernate: Introduce snapshot test mode
 for hibernation


> -----Original Message-----
> From: rjwysocki@...il.com [mailto:rjwysocki@...il.com] On Behalf Of
> Rafael J. Wysocki
> Sent: Wednesday, July 13, 2016 8:07 PM
> To: Chen, Yu C
> Cc: Linux PM; Rafael J . Wysocki; Pavel Machek; Len Brown; Linux Kernel
> Mailing List
> Subject: Re: [PATCH][RFC v2] PM / hibernate: Introduce snapshot test mode for
> hibernation
> 
> On Wed, Jul 13, 2016 at 8:08 AM, Chen Yu <yu.c.chen@...el.com> wrote:
> > This mode is used to verify if the snapshot data written to the swap
> > device can be successfully restored to the memory. It is useful to
> > ease the debugging process on hibernation, since this mode can not
> > only bypass the BIOSen/bootloader, but also the system
> > re-initialization.
> >
> > For example:
> > $ sudo echo snapshot > /sys/power/pm_test $ sudo echo disk >
> > /sys/power/state
> >
> > [  267.959784] PM: Image saving progress:  80% [  268.038669] PM:
> > Image saving progress:  90% [  268.111745] PM: Image saving progress:
> > 100% [  268.129269] PM: Image saving done.
> > [  268.133485] PM: Wrote 518612 kbytes in 0.75 seconds (691.48 MB/s) [
> > 268.140564] PM: S| [  268.160067] hibernation debug: Waiting for 5
> > seconds.
> > ...
> > [  273.508638] PM: Looking for hibernation image.
> > [  273.516583] PM: Image signature found, resuming [  273.926547] PM:
> > Loading and decompressing image data (129653 pages)...
> > [  274.122452] PM: Image loading progress:   0%
> > [  274.322127] PM: Image loading progress:  10% ...
> >
> > Rebased on top of linux-next.
> >
> > Suggested-by: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
> > Signed-off-by: Chen Yu <yu.c.chen@...el.com>
> > ---
> >  kernel/power/hibernate.c | 10 ++++++++--
> >  kernel/power/main.c      |  3 +++
> >  kernel/power/power.h     |  3 +++
> >  kernel/power/swap.c      |  7 +++++++
> >  4 files changed, 21 insertions(+), 2 deletions(-)
> >
> > diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c index
> > 51441d8..30cc5b4 100644
> > --- a/kernel/power/hibernate.c
> > +++ b/kernel/power/hibernate.c
> > @@ -43,6 +43,7 @@ static char resume_file[256] =
> > CONFIG_PM_STD_PARTITION;  dev_t swsusp_resume_device;  sector_t
> > swsusp_resume_block;  __visible int in_suspend __nosavedata;
> > +static int software_resume(void);
> >
> >  enum {
> >         HIBERNATION_INVALID,
> > @@ -647,7 +648,7 @@ static void power_down(void)
> >   */
> >  int hibernate(void)
> >  {
> > -       int error, nr_calls = 0;
> > +       int error, nr_calls = 0, snapshot_test = 0;
> 
> Why can't snapshot_test be a bool variable?
Ah yes, it was a bool, I was just thinking to add this new variable
similar to the variable 'error'. I'll change it to bool in next version, and also
add document as Pavel suggested. 
> 
> Thanks,
> Rafael

thanks,
Yu

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ