public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Alexander Potapenko <glider@google.com>
Cc: Johannes Stezenbach <js@sig21.net>, Pavel Machek <pavel@ucw.cz>,
	Andrew Morton <akpm@linux-foundation.org>,
	Kees Cook <keescook@chromium.org>, Michal Hocko <mhocko@suse.cz>,
	linux-pm@vger.kernel.org
Subject: Re: init_on_free breaks hibernate
Date: Tue, 14 Jan 2020 23:36:01 +0100	[thread overview]
Message-ID: <38519837.OfHf9z5LDp@kreacher> (raw)
In-Reply-To: <CAG_fn=VjzJSguf4ZB2x8Xn=U9MCHyfyqd2DVwPPC36t5+S+VsQ@mail.gmail.com>

On Tuesday, January 14, 2020 12:38:53 PM CET Alexander Potapenko wrote:
> > > Strange about the resume=/dev/vda, it worked for me the way I described it.
> > > Maybe device numbers are dynamic, 254:0 is what I got from ls -l /dev/vda.
> > Indeed, for me it's 253:0, and resuming from console works with that number.
> >
> > > > The memory corruption is also reproducible for me, taking a look.
> > >
> 
> I think I know what is causing the problem.
> Upon resume the free pages may contain stale information from the
> kernel that initiated the resume.
> There's clear_free_pages()
> (https://elixir.bootlin.com/linux/latest/source/kernel/power/snapshot.c#L1148)
> that clears the pages in the case CONFIG_PAGE_POISONING_ZERO is
> enabled, we just need to reuse it for init_on_free.
> See the potential fix below.
> 
> Rafael, Pavel, I've noticed that in the setup suggested by Johannes
> even the defconfig kernel with heap initialization cannot hibernate
> more than twice, the third hibernate hangs.
> Is that a known problem?

No, it is not.




  reply	other threads:[~2020-01-14 22:36 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-23 21:13 init_on_free breaks hibernate Johannes Stezenbach
2020-01-13  9:26 ` Johannes Stezenbach
2020-01-13 11:07   ` Rafael J. Wysocki
2020-01-13 13:42     ` Alexander Potapenko
2020-01-13 15:18   ` Alexander Potapenko
2020-01-13 15:41     ` Alexander Potapenko
2020-01-13 17:15       ` Johannes Stezenbach
2020-01-14 10:07         ` Alexander Potapenko
2020-01-14 11:38           ` Alexander Potapenko
2020-01-14 22:36             ` Rafael J. Wysocki [this message]
2020-01-15  9:10               ` Alexander Potapenko

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=38519837.OfHf9z5LDp@kreacher \
    --to=rjw@rjwysocki.net \
    --cc=akpm@linux-foundation.org \
    --cc=glider@google.com \
    --cc=js@sig21.net \
    --cc=keescook@chromium.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mhocko@suse.cz \
    --cc=pavel@ucw.cz \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox