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

On Sun, Dec 09, 2007 at 10:46:35PM +0100, Rafael J. Wysocki wrote:
> 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.

right, i was kinda wondering when actually a swsusp image won't match after looking
at check_image_kernel() but missed that arch-specific RESTORE_MAGIC bit.
Thanks for clearing that up.

-- 
Regards/Gruß,
    Boris.

      reply	other threads:[~2007-12-10  4:54 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
2007-12-10  4:51                   ` Borislav Petkov [this message]

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=20071210045104.GA7169@gollum.tnic \
    --to=bbpetkov@yahoo.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@suse.cz \
    --cc=rjw@sisk.pl \
    /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).