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: Thu, 6 Dec 2007 22:46:48 +0100 [thread overview]
Message-ID: <200712062246.49422.rjw@sisk.pl> (raw)
In-Reply-To: <20071206211335.GA4923@gollum.tnic>
On Thursday, 6 of December 2007, Borislav Petkov wrote:
> Hi Pavel,
> hi Rafael,
>
> after a quick search i couldn't find anything dealing with the topic in the
> subject line so here we go:
>
> One sometimes can mix up (and by one i mean me) the
> kernel images one boots after having suspended the machine previously. There can
> be at least two reasons for that:
>
> 1. too many kernels in grub and having forgotten with which i suspended.
> 2. compile and install a new kernel and forget about it, suspend in the evening
> and then boot with the new kernel;
>
> in both cases you end up staring at fsck since they filesystems haven't been unmounted,
> of course. Or at least see the warning message of some journal recovery whisk away.
>
> In order to alleviate that, one could probably go, imho, and write in the swsusp_header
> the kernel version which suspended the machine (UTS_RELEASE) alongside
> SWSUSP_SIG and check that against the kernel version of the image just booting.
> If they match then all is well, if not, one could
>
> a) issue a BIG FAT WARNING and reboot telling the user to select the proper
> image
> b) ask the user what to do:
> - proceed as if "noresume" has been entered on the kernel command line
> - reboot after issuing the kernel version which suspended the machine
> -
> c)...
>
> In case you guys think something like that might be of use i can come up with a
> patch in the next coupla days...
Well, there's a patchset in the current mainline that allows you to use
arbitrary (sufficiently new) kernel to load the image and then restore the
image kernel. So, you can hibernate 2.6.24-rc3 and use 2.6.24-rc2 to restore
it, for example.
I'm going to do that for i386 too.
Greetings,
Rafael
next prev parent reply other threads:[~2007-12-06 21:28 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-06 21:13 Borislav Petkov
2007-12-06 21:46 ` Rafael J. Wysocki [this message]
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
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=200712062246.49422.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
all inboxes | Powered by JetHome®