Re: resuming swsusp twice
From: Pavel Machek (pavel_at_suse.cz)
Date: 07/15/05
- Previous message: Pavel Machek: "Re: [RFC][PATCH 1/4] add jiffies_to_nsecs() helper and fix up size of usecs"
- In reply to: Andy Isaacson: "Re: resuming swsusp twice"
- Next in thread: Pavel Machek: "Re: resuming swsusp twice"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 15 Jul 2005 10:35:37 +0200 To: Andy Isaacson <adi@hexapodia.org>
Hi!
> > I of course won't say that this cannot happen, but by design, the
> > swsusp
> > signature is invalidated even before reading the image, so
> > theoretically
> > it should not happen.
>
> Yes, I'd seen that happen on earlier swsusps, so I was quite suprised
> when it blew up like this.
>
> Perhaps the image should be more rigorously checked? I'm wishing that
> it would verify that the header and the image matched, after it finishes
> reading the image. For example, computing the hash
>
> MD5(header || image) (|| denotes "concatenate" in crypto pseudocode.)
>
> and storing that hash in a final trailing block. Additionally, of
> course, as soon as the resume has read the image it should overwrite the
> header; and the header should include jiffies or something along those
> lines to ensure that it won't accidentally have the same contents as the
> previous image's header.
>
> The hash doesn't have to be MD5; even a CRC should suffice I think...
That's quite a lot of complexity... just fix the bug.
Pavel
-- teflon -- maybe it is a trademark, but it should not be. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- Previous message: Pavel Machek: "Re: [RFC][PATCH 1/4] add jiffies_to_nsecs() helper and fix up size of usecs"
- In reply to: Andy Isaacson: "Re: resuming swsusp twice"
- Next in thread: Pavel Machek: "Re: resuming swsusp twice"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|