From: Rafael J. Wysocki <[email protected]>
Commit 3624eb0 (PM / Hibernate: Modify signature used to mark swap)
modified hibernate signature used to mark swap partitions containing
hibernation images, but that turns out to have caused problems in
libblkid on recent Ubuntu. Restore the old signature to avoid those
problems.
Signed-off-by: Rafael J. Wysocki <[email protected]>
Reported-by: Dr. David Alan Gilbert <[email protected]>
---
kernel/power/swap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: linux-2.6/kernel/power/swap.c
===================================================================
--- linux-2.6.orig/kernel/power/swap.c
+++ linux-2.6/kernel/power/swap.c
@@ -30,7 +30,7 @@
#include "power.h"
-#define HIBERNATE_SIG "LINHIB0001"
+#define HIBERNATE_SIG "S1SUSPEND"
/*
* The swap map is a data structure used for keeping track of each page
On Sun, 2010-12-05 at 23:24 +0100, Rafael J. Wysocki wrote:
> Commit 3624eb0 (PM / Hibernate: Modify signature used to mark swap)
> modified hibernate signature used to mark swap partitions containing
> hibernation images, but that turns out to have caused problems in
> libblkid on recent Ubuntu. Restore the old signature to avoid those
> problems.
Don't quite understand this change (sorry, probably just being obtuse).
The signature was changed to make sure older kernels don't handle
compressed images by accident, right? If so, this would seem like a bad
idea, because this is what can actually happen now.
Shouldn't user space learn how to handle both signatures instead?
--
Bojan
On Mon, Dec 06, 2010 at 10:36:55AM +1100, Bojan Smojver wrote:
> On Sun, 2010-12-05 at 23:24 +0100, Rafael J. Wysocki wrote:
> > Commit 3624eb0 (PM / Hibernate: Modify signature used to mark swap)
> > modified hibernate signature used to mark swap partitions containing
> > hibernation images, but that turns out to have caused problems in
> > libblkid on recent Ubuntu. Restore the old signature to avoid those
> > problems.
>
> Don't quite understand this change (sorry, probably just being obtuse).
I too.
> The signature was changed to make sure older kernels don't handle
> compressed images by accident, right? If so, this would seem like a bad
> idea, because this is what can actually happen now.
>
> Shouldn't user space learn how to handle both signatures instead?
The upstream libblkid has been updated, there is not a problem to
support more signatures.
Karel
--
Karel Zak <[email protected]>
http://karelzak.blogspot.com
On Monday, December 06, 2010, Karel Zak wrote:
> On Mon, Dec 06, 2010 at 10:36:55AM +1100, Bojan Smojver wrote:
> > On Sun, 2010-12-05 at 23:24 +0100, Rafael J. Wysocki wrote:
> > > Commit 3624eb0 (PM / Hibernate: Modify signature used to mark swap)
> > > modified hibernate signature used to mark swap partitions containing
> > > hibernation images, but that turns out to have caused problems in
> > > libblkid on recent Ubuntu. Restore the old signature to avoid those
> > > problems.
> >
> > Don't quite understand this change (sorry, probably just being obtuse).
>
> I too.
>
> > The signature was changed to make sure older kernels don't handle
> > compressed images by accident, right? If so, this would seem like a bad
> > idea, because this is what can actually happen now.
> >
> > Shouldn't user space learn how to handle both signatures instead?
>
> The upstream libblkid has been updated, there is not a problem to
> support more signatures.
Cool.
I'm withdrawing the patch, then.
Thanks,
Rafael
On Monday, December 06, 2010, Bojan Smojver wrote:
> On Sun, 2010-12-05 at 23:24 +0100, Rafael J. Wysocki wrote:
> > Commit 3624eb0 (PM / Hibernate: Modify signature used to mark swap)
> > modified hibernate signature used to mark swap partitions containing
> > hibernation images, but that turns out to have caused problems in
> > libblkid on recent Ubuntu. Restore the old signature to avoid those
> > problems.
>
> Don't quite understand this change (sorry, probably just being obtuse).
>
> The signature was changed to make sure older kernels don't handle
> compressed images by accident, right? If so, this would seem like a bad
> idea, because this is what can actually happen now.
>
> Shouldn't user space learn how to handle both signatures instead?
I'm afraid I'll have to push this patch to Linus. Turns out that Fedora 14
doesn't pass the resume= argument to the kernel and tries to trigger the resume
from initramfs. Since the signature changed, it can't find the image and the
resume fails, even if both the resume and image kernels are the same.
Thanks,
Rafael
On Sunday, December 05, 2010, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <[email protected]>
>
> Commit 3624eb0 (PM / Hibernate: Modify signature used to mark swap)
> modified hibernate signature used to mark swap partitions containing
> hibernation images, but that turns out to have caused problems in
> libblkid on recent Ubuntu. Restore the old signature to avoid those
> problems.
Below is the same patch with modified changelog reflecting the recent findings.
Thanks,
Rafael
---
From: Rafael J. Wysocki <[email protected]>
Subject: PM / Hibernate: Restore old swap signature to avoid user space breakage
Commit 3624eb0 (PM / Hibernate: Modify signature used to mark swap)
attempted to modify hibernate signature used to mark swap partitions
containing hibernation images, so that old kernels don't try to
handle compressed images. However, this change broke resume from
hibernation on Fedora 14 that apparently doesn't pass the resume=
argument to the kernel and tries to trigger resume from early user
space. This doesn't work, because the signature is now different,
so the old signature has to be restored to avoid the problem.
Signed-off-by: Rafael J. Wysocki <[email protected]>
Reported-by: Dr. David Alan Gilbert <[email protected]>
Reported-by: Pascal Chapperon <[email protected]>
---
kernel/power/swap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: linux-2.6/kernel/power/swap.c
===================================================================
--- linux-2.6.orig/kernel/power/swap.c
+++ linux-2.6/kernel/power/swap.c
@@ -30,7 +30,7 @@
#include "power.h"
-#define HIBERNATE_SIG "LINHIB0001"
+#define HIBERNATE_SIG "S1SUSPEND"
/*
* The swap map is a data structure used for keeping track of each page
On Sat, 2010-12-11 at 20:58 +0100, Rafael J. Wysocki wrote:
> I'm afraid I'll have to push this patch to Linus. Turns out that
> Fedora 14 doesn't pass the resume= argument to the kernel and tries to
> trigger the resume from initramfs. Since the signature changed, it
> can't find the image and the resume fails, even if both the resume and
> image kernels are the same.
Why don't you just file a Fedora bug asking for the library to be
upgraded or patched?
PS. Karel, who also replied to this thread, has a Red Hat address and he
seems to be the maintainer of util-linux-ng package. He should be able
to fix this.
--
Bojan
On Saturday, December 11, 2010, Bojan Smojver wrote:
> On Sat, 2010-12-11 at 20:58 +0100, Rafael J. Wysocki wrote:
> > I'm afraid I'll have to push this patch to Linus. Turns out that
> > Fedora 14 doesn't pass the resume= argument to the kernel and tries to
> > trigger the resume from initramfs. Since the signature changed, it
> > can't find the image and the resume fails, even if both the resume and
> > image kernels are the same.
>
> Why don't you just file a Fedora bug asking for the library to be
> upgraded or patched?
Because that wouldn't fix the user space that _already_ is out there.
> PS. Karel, who also replied to this thread, has a Red Hat address and he
> seems to be the maintainer of util-linux-ng package. He should be able
> to fix this.
That doesn't matter. The rule is we don't break user space, even if it does
unreasonable things.
Thanks,
Rafael
On Sat, 2010-12-11 at 21:36 +0100, Rafael J. Wysocki wrote:
> Because that wouldn't fix the user space that _already_ is out there.
Of course. I'm sure there are other things in various new kernel that
older user space isn't aware of. It just depends on how far back you
wish to go.
> That doesn't matter. The rule is we don't break user space, even if it does
> unreasonable things.
But it won't really be broken. I actually tested compression patches on
F-14. All you need to do is pass resume argument to grub for 2.6.37
kernel you installed by hand (and at present, you can only do this by
hand). If Fedora folks decide to upgrade the kernel to 2.6.37 for F-14
(they already have for F-15, so they must be aware of the issue), I'm
sure they'll fix util-linux-ng, dracut and whatever else is required for
this to work.
PS. Koji build of the kernel for F-15, based in 2.6.37-rc5:
http://koji.fedoraproject.org/koji/buildinfo?buildID=208625
--
Bojan
On Saturday, December 11, 2010, Bojan Smojver wrote:
> On Sat, 2010-12-11 at 21:36 +0100, Rafael J. Wysocki wrote:
>
> > Because that wouldn't fix the user space that _already_ is out there.
>
> Of course. I'm sure there are other things in various new kernel that
> older user space isn't aware of. It just depends on how far back you
> wish to go.
>
> > That doesn't matter. The rule is we don't break user space, even if it does
> > unreasonable things.
>
> But it won't really be broken. I actually tested compression patches on
> F-14. All you need to do is pass resume argument to grub for 2.6.37
> kernel you installed by hand (and at present, you can only do this by
> hand). If Fedora folks decide to upgrade the kernel to 2.6.37 for F-14
> (they already have for F-15, so they must be aware of the issue), I'm
> sure they'll fix util-linux-ng, dracut and whatever else is required for
> this to work.
Then we can change the signature, no earlier.
> PS. Koji build of the kernel for F-15, based in 2.6.37-rc5:
>
> http://koji.fedoraproject.org/koji/buildinfo?buildID=208625
Thanks,
Rafael
On Sat, 2010-12-11 at 21:49 +0100, R. J. Wysocki wrote:
> Then we can change the signature, no earlier.
OK, no skin off my back :-)
--
Bojan