All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Chen Yu <yu.c.chen@intel.com>
Cc: joeyli <jlee@suse.com>, "Rafael J. Wysocki" <rjw@rjwysocki.net>,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH][v6] PM / hibernate: Print the possible panic reason when resuming with inconsistent e820 map
Date: Sun, 28 Aug 2016 14:47:38 +0200	[thread overview]
Message-ID: <20160828124738.GA10562@amd> (raw)
In-Reply-To: <20160828020710.GB5941@sharon>

On Sun 2016-08-28 10:07:10, Chen Yu wrote:
> Hi,
> On Fri, Aug 26, 2016 at 09:56:54PM +0200, Pavel Machek wrote:
> > Hi!
> > 
> > > > > > What's the progress of this patch? Looks already have experts review it.
> > > > > > Why this patch didn't accept?
> > > > > This patch is a little overkilled, and I have saved another simpler
> > > > > version to only check the md5 hash (as people suggested) for it. I can post it later.
> > > > > 
> > > > 
> > > > I am happy to test and review it.
> > > >
> > > Here it is. As Rafael is on travel, it would be grateful
> > > if you can give some advance on this, thanks!
> > 
> > Better than last one.
> > 
> > > +		return -ENOMEM;
> > > +
> > > +	req = ahash_request_alloc(tfm, GFP_ATOMIC);
> > 
> > what context is this called from? GFP_ATOMIC allocations like to fail...
> >
> It is in normal process context, OK, I'll change it to GFP_KERNEL.
> > > +static int hibernation_e820_check(void *buf)
> > > +{
> > > +	int ret;
> > > +	char result[MD5_HASH_SIZE] = {0};
> > > +
> > > +	ret = get_e820_md5(&e820_saved, result);
> > > +	if (ret)
> > > +		return ret;
> > > +
> > > +	if (memcmp(result, buf, MD5_HASH_SIZE))
> > > +		e820_conflict = true;
> > 
> > Passing return value using global variable is ugly. Can you just print
> > the warning and kill the box here?
> Do you mean get rid of the panic hooker and just print the warning
> here?

Yep, I'd do that... (And you probably want to rise the severity).

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

  reply	other threads:[~2016-08-28 12:47 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-21  5:21 [PATCH][v6] PM / hibernate: Print the possible panic reason when resuming with inconsistent e820 map Chen Yu
2016-08-23  9:45 ` joeyli
2016-08-23 10:01   ` Chen Yu
2016-08-24  1:36     ` joeyli
2016-08-25 11:07       ` Chen Yu
2016-08-26 19:56         ` Pavel Machek
2016-08-28  2:07           ` Chen Yu
2016-08-28 12:47             ` Pavel Machek [this message]
2016-08-28 13:08               ` Chen, Yu C
2016-08-28 13:15                 ` Pavel Machek
2016-08-28 13:34                   ` Chen, Yu C
  -- strict thread matches above, loose matches on Subject: below --
2016-08-29  1:37 Andreas Mohr

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160828124738.GA10562@amd \
    --to=pavel@ucw.cz \
    --cc=jlee@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=yu.c.chen@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.