linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: bbpetkov@yahoo.de
Cc: Pavel Machek <pavel@suse.cz>, linux-kernel@vger.kernel.org
Subject: Re: [RFC] swap image signature check upon resume
Date: Sun, 9 Dec 2007 22:46:35 +0100	[thread overview]
Message-ID: <200712092246.36217.rjw@sisk.pl> (raw)
In-Reply-To: <20071209160959.GA4978@gollum.tnic>

On Sunday, 9 of December 2007, Borislav Petkov wrote:
> On Sun, Dec 09, 2007 at 03:27:57PM +0100, Rafael J. Wysocki wrote:
> ...
> 
> > > Instead, I'd rather issue a warning that the swsusp header mismatches, say with
> > > which kernel the machine got suspended with and then start the countdown for reboot.
> > 
> > What exactly would that change?  You need to reboot anyway and fsck will run on
> > the filesystems regardless of which kernel you boot with.
> 
> well, you'll have the chance to reboot with the kernel the machine got suspended
> with and then the swsusp image header _will_ match so no fsck-ing. or am i
> missing something...

Yes, you are. :-)

With the new code (which BTW I'm assuming we are talking about) the images are
not matched against the kernel they were created by, but against a hard-coded
magic number (defined in suspend_64.c) playing the role of the "header protocol
version" and against some system parameters, like the amount of RAM etc.
Since all kernels containing the new code use the same magic number, all of
them will match or none of them will match.

Of course, we may want to change the magic at some point and in that case
there you will have some non-matching kernels.  If you're worried about that,
use the userland hibernation tools from suspend.sf.net (they handle such
situations quite well).

Greetings,
Rafael

  reply	other threads:[~2007-12-09 21:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-06 21:13 [RFC] swap image signature check upon resume Borislav Petkov
2007-12-06 21:46 ` Rafael J. Wysocki
2007-12-07  7:12   ` Borislav Petkov
2007-12-07 20:19     ` Rafael J. Wysocki
2007-12-08 11:33       ` Borislav Petkov
2007-12-08 22:50         ` Rafael J. Wysocki
2007-12-09  6:55           ` Borislav Petkov
2007-12-09 14:27             ` Rafael J. Wysocki
2007-12-09 14:32               ` Rafael J. Wysocki
2007-12-09 16:09               ` Borislav Petkov
2007-12-09 21:46                 ` Rafael J. Wysocki [this message]
2007-12-10  4:51                   ` Borislav Petkov

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=200712092246.36217.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=bbpetkov@yahoo.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@suse.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;
as well as URLs for NNTP newsgroup(s).