Skip to contentSkip to conversation

initrd change breaks binary compatibility

DISCUSSION John Levon 3 participants 5 messages Oct 10, 2006

lore
Share & tools
lore

John Levon

author
#0 lore raw

This change in 3.0.3-testing-rc3:

changeset:   11728:30f13007be3f
user:        [email protected]
date:        Mon Oct 09 13:50:00 2006 +0100
files:       tools/libxc/xc_linux_build.c

description:
[XEND] No need to decompress the initrd when building a domain.

breaks binary compatibility. In particular, it breaks Solaris, which expects both grub and xen to uncompress the initrd for us. And it does seem odd to differ from grub's behaviour needlessly.

I don't know what causes the broken Linux initrd's that the commit message refers to, but it seems they need to be fixed another way.

regards,
john

#1 lore raw
Quoted 9 lines · John Levon

This change in 3.0.3-testing-rc3:

changeset:   11728:30f13007be3f
user:        [email protected]
date:        Mon Oct 09 13:50:00 2006 +0100
files:       tools/libxc/xc_linux_build.c

description:
[XEND] No need to decompress the initrd when building a domain.

Quoted 6 lines

breaks binary compatibility. In particular, it breaks Solaris, which expects both grub and xen to uncompress the initrd for us. And it does seem odd to differ from grub's behaviour needlessly.

I don't know what causes the broken Linux initrd's that the commit message refers to, but it seems they need to be fixed another way.

I suspect that we're actually broken here. I think the way we determine the uncompressed size (by reading the last couple bytes) is not something that can, in generally, be safely relied upon.

We could work around this by decompressing the initrd and dynamically expanding the buffer we're decompressing to as needed.

Regards,

Anthony Liguori

Quoted 2 lines

regards,
john

#2 lore raw
Quoted 9 lines · Anthony Liguori
Quoted 2 lines

I don't know what causes the broken Linux initrd's that the commit message refers to, but it seems they need to be fixed another way.

I suspect that we're actually broken here. I think the way we determine the uncompressed size (by reading the last couple bytes) is not something that can, in generally, be safely relied upon.

We could work around this by decompressing the initrd and dynamically expanding the buffer we're decompressing to as needed.

Yes, we'll do this after 3.0.3-0. It's just a little bit too tricky to slip in for the release. Unfortunately we have seen some (SLES9) initrd images with this issue. Presumably they get built in a way that ends up padding them to a multiple of a 'block' or something like that. It can be fixed by laundering the initrd through gzip, of course.

-- Keir

author
#3 lore raw
Quoted 7 lines · Keir Fraser
Quoted 7 lines
Quoted 2 lines

I don't know what causes the broken Linux initrd's that the commit message refers to, but it seems they need to be fixed another way.

I suspect that we're actually broken here. I think the way we determine the uncompressed size (by reading the last couple bytes) is not something that can, in generally, be safely relied upon.

Quoted 5 lines
Quoted 2 lines

We could work around this by decompressing the initrd and dynamically expanding the buffer we're decompressing to as needed.

Yes, we'll do this after 3.0.3-0. It's just a little bit too tricky to slip in for the release.

Does this mean the current change will be reverted?

regards,
john

#4 lore raw
Quoted 11 lines · John Levon
Quoted 9 lines
Quoted 6 lines

I suspect that we're actually broken here. I think the way we determine the uncompressed size (by reading the last couple bytes) is not something that can, in generally, be safely relied upon.

We could work around this by decompressing the initrd and dynamically expanding the buffer we're decompressing to as needed.

Yes, we'll do this after 3.0.3-0. It's just a little bit too tricky to slip in for the release.

Does this mean the current change will be reverted?

Yes, that's now done.

-- Keir