mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
	rjw@sisk.pl, tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com,
	x86@kernel.org
Subject: Re: [PATCH] x86, x86-64, gdt, hibernate: Store/load GDT for hibernate path.
Date: Thu, 2 May 2013 14:34:38 +0200	[thread overview]
Message-ID: <20130502123438.GD22618@amd.pavel.ucw.cz> (raw)
In-Reply-To: <1367459610-9656-2-git-send-email-konrad.wilk@oracle.com>

Hi!

> The git commite7a5cd063c7b4c58417f674821d63f5eb6747e37
> ("x86-64, gdt: Store/load GDT for ACPI S3 or hibernate/resume path
> is not needed.") assumes that for the hibernate path the booting
> kernel and the resuming kernel MUST be the same. That is certainly
> the case for a 32-bit kernel (see check_image_kernel and
> CONFIG_ARCH_HIBERNATION_HEADER config option).
> 
> However for 64-bit kernels it is OK to have a different kernel
> version (and size of the image) of the booting and resuming kernels.
> Hence the above mentioned git commit introduces an regression.

Ok.

> This patch fixes it by introducing a 'struct desc_ptr gdt_desc'
> back in the 'struct saved_context'. However instead of having in the
> 'save_processor_state' and 'restore_processor_state' the
> store/load_gdt calls, we are only saving the GDT in the
> save_processor_state.
> 
> For the restore path the lgdt operation is done in
> hibernate_asm_[32|64].S in the 'restore_registers' path.

So the on-disk format changed and we need to bump the version number
somewhere?

I guess we should add big fat warning to the affected structures.

								Pavel

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

  parent reply	other threads:[~2013-05-02 12:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-02  1:53 [RFC] Fix restore from hibernate with different kernel versions Konrad Rzeszutek Wilk
2013-05-02  1:53 ` [PATCH] x86, x86-64, gdt, hibernate: Store/load GDT for hibernate path Konrad Rzeszutek Wilk
2013-05-02 12:00   ` Rafael J. Wysocki
2013-05-02 12:34   ` Pavel Machek [this message]
2013-05-02 12:50     ` Konrad Rzeszutek Wilk
2013-05-02 17:25   ` [tip:x86/urgent] x86, gdt, hibernate: Store/ load " tip-bot for Konrad Rzeszutek Wilk
2013-05-02 18:32   ` tip-bot for Konrad Rzeszutek Wilk

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=20130502123438.GD22618@amd.pavel.ucw.cz \
    --to=pavel@ucw.cz \
    --cc=hpa@zytor.com \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=rjw@sisk.pl \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /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

all inboxes | Powered by JetHome®