PM / Hibernate: Restore old swap signature to avoid user space breakage
Subsystems (2)
PATCH 1/1 PM / Hibernate: Restore old swap signature to avoid user space breakage
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.
--- kernel/power/swap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/power/swap.c +1 -1
@@ -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
Quoted 5 lines · Rafael J. Wysocki
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?
Signature · 1 line
Bojan
Quoted 8 lines · Bojan Smojver
Quoted 5 lines · Rafael J. Wysocki
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.
Quoted 5 lines
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
Signature · 2 lines
Karel Zak <[email protected]> http://karelzak.blogspot.com
Quoted 8 lines · Bojan Smojver
Quoted 5 lines · Rafael J. Wysocki
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.
Quoted 5 lines
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
Signature · 2 lines
Karel Zak <[email protected]> http://karelzak.blogspot.com
Quoted 12 lines · Karel Zak
Quoted 8 lines · Bojan Smojver
Quoted 5 lines · Rafael J. Wysocki
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.
Quoted 8 lines
Quoted 5 lines
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
Quoted 12 lines · Karel Zak
Quoted 8 lines · Bojan Smojver
Quoted 5 lines · Rafael J. Wysocki
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.
Quoted 8 lines
Quoted 5 lines
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
Quoted 7 lines · Bojan Smojver
Quoted 5 lines · Rafael J. Wysocki
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.
Quoted 7 lines
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
Quoted 7 lines · Bojan Smojver
Quoted 5 lines · Rafael J. Wysocki
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.
Quoted 7 lines
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
Quoted 5 lines · Rafael J. Wysocki
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.
Signature · 1 line
Bojan
Quoted 5 lines · Rafael J. Wysocki
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.
Signature · 1 line
Bojan
Quoted 9 lines · Bojan Smojver
Quoted 5 lines · Rafael J. Wysocki
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.
Quoted 3 lines
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
Quoted 9 lines · Bojan Smojver
Quoted 5 lines · Rafael J. Wysocki
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.
Quoted 3 lines
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
Quoted 1 line · Rafael J. Wysocki
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.
Quoted 2 lines
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
Signature · 1 line
Bojan
Quoted 1 line · Rafael J. Wysocki
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.
Quoted 2 lines
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
Signature · 1 line
Bojan
Quoted 11 lines · Bojan Smojver
Quoted 1 line · Rafael J. Wysocki
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.
Quoted 2 lines
That doesn't matter. The rule is we don't break user space, even if it does unreasonable things.
Quoted 7 lines
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.
Quoted 3 lines
PS. Koji build of the kernel for F-15, based in 2.6.37-rc5:
Thanks,
Rafael
Quoted 1 line · R. J. Wysocki
Then we can change the signature, no earlier.
OK, no skin off my back :-)
Signature · 1 line
Bojan
Quoted 1 line · R. J. Wysocki
Then we can change the signature, no earlier.
OK, no skin off my back :-)
Signature · 1 line
Bojan
Quoted 7 lines · Rafael J. Wysocki
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.
--- kernel/power/swap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/power/swap.c +1 -1
@@ -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
Quoted 7 lines · Rafael J. Wysocki
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.
--- kernel/power/swap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/power/swap.c +1 -1
@@ -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