PATCH/RFC: bzImage payload as compressed ELF file.
Hi Peter,
This patch switches the payload of a bzImage file to be in compressed ELF format. There are several rough edges which need to be addressed before it could go any further but I'd be interested to hear your opinion of the general approach before I spend time cleaning it up.
I'm mainly interested in something along these lines to allow the Xen bootloader to load a bzImage so that distros don't have to maintain two kernel packages with the same basic bits in different file formats, I think it would probably be of use to the kexec and/or lguest folks too.
The patch boots on native 32 and 64 bit x86. I haven't done the matching Xen domain builder work but the attached bzexplode.c is a trivial/ugly (don't judge me based on it ;-)) test app which extracts the payload, which I have been able to boot as a 32 bit Xen domU, as you'd expect.
The payload is simply the stripped and compressed toplevel vmlinux file. I assume that ELF program headers will be ordered by physical address within the ELF file since this (and the general simplicity of the kernel ELF layout) makes the ELF "parser" pretty trivial. I think the assumption is safe because for the kernel paddr=vaddr-offset and the ELF spec says (in book I chapter 2 "Program Header"):
Loadable segment entries in the program header table appear in ascending order, sorted on the p_vaddr member.
Slightly less obvious is if the data within the ELF file is in the same order as the program headers. I think the kernel is constrained enough that we can guarantee this.
What would be the preferred way of allowing bootloaders/domain builders to find the compressed payload? Tacking the offset from the end onto the end as I have done for the moment seems pretty skanky...
Ian.
x86: switch compressed payload to ELF format.
This allows other boot loaders such as the Xen domain builder the opportunity to extract the ELF file.
arch/x86/Makefile +0 -1
@@ -90,7 +90,6 @@ KBUILD_AFLAGS += $(cfi) $(cfi-sigframe) KBUILD_CFLAGS += $(cfi) $(cfi-sigframe) LDFLAGS := -m elf_$(UTS_MACHINE) -OBJCOPYFLAGS := -O binary -R .note -R .comment -S # Speed up the build KBUILD_CFLAGS += -pipe
arch/x86/boot/Makefile +1 -0
@@ -80,6 +80,7 @@ $(obj)/zImage $(obj)/bzImage: $(obj)/setup.bin \ $(call if_changed,image) @echo 'Kernel: $@ is ready' ' (#'`cat .version`')' +$(obj)/vmlinux.bin: OBJCOPYFLAGS := -O binary -R .note -R .comment -S $(obj)/vmlinux.bin: $(obj)/compressed/vmlinux FORCE $(call if_changed,objcopy)
arch/x86/boot/compressed/Makefile +1 -0
@@ -22,6 +22,7 @@ $(obj)/vmlinux: $(src)/vmlinux_$(BITS).lds $(obj)/head_$(BITS).o $(obj)/misc.o $ $(call if_changed,ld) @: +$(obj)/vmlinux.bin: OBJCOPYFLAGS := -R .comment --strip-all $(obj)/vmlinux.bin: vmlinux FORCE $(call if_changed,objcopy)
arch/x86/boot/compressed/misc.c +71 -0
95 lines not on this page · raw message
arch/x86/boot/compressed/vmlinux_32.lds +4 -0
@@ -40,4 +40,8 @@ SECTIONS *(COMMON) _end = . ; } + .data.trailer : { + LONG(. - input_data + 8) payload_offset = .; + LONG(input_data_end - input_data) payload_length = .; + } }
arch/x86/boot/compressed/vmlinux_64.lds +4 -0
@@ -45,4 +45,8 @@ SECTIONS . = . + 4096 * 6; _heap = .; } + .data.trailer : { + LONG(. - input_data + 8) payload_offset = .; + LONG(input_data_end - input_data) payload_length = .; + } }
Signature · 4 lines
Ian Campbell Showing up is 80% of life. -- Woody Allen
#include <stdio.h>
#include <fcntl.h>
#include <stdint.h>
#include <unistd.h>
#include <inttypes.h>
#include <err.h>
#include <sys/types.h>
#include <sys/mman.h>
#include <sys/stat.h>
#define min(x,y) (x<y?x:y)
int main(int argc, char **argv)
{
int fd;
off_t payload_offset = 0;
struct stat sb;
unsigned int len;
off_t offset;
int rc;
char buf[4096];
if (argc != 2)
errx(1, "usage: bzexlode <bzImage>");
fd = open(argv[1], O_RDONLY);
if (fd < 0)
err(1, "open");
if (fstat(fd, &sb) < 0)
err(1, "fstat");
offset = lseek(fd, -8, SEEK_END);
rc = read(fd, &payload_offset, 4);
rc = read(fd, &len, 4);
fprintf(stderr, "payload is at offset %zx = %zx\n",
payload_offset, sb.st_size - payload_offset);
fprintf(stderr, "payload len is %x\n", len);
offset = lseek(fd, -payload_offset, SEEK_END);
fprintf(stderr, "starting from %"PRIx64"\n", offset);
while(len) {
rc = read(fd, buf, min(len,sizeof(buf)));
fprintf(stderr, "\rremaining %x %d", len, rc);
write(1, buf, rc);
len -= rc;
}
fprintf(stderr, "\n");
return 0;
}Quoted 10 lines · Ian Campbell
I'm mainly interested in something along these lines to allow the Xen bootloader to load a bzImage so that distros don't have to maintain two kernel packages with the same basic bits in different file formats, I think it would probably be of use to the kexec and/or lguest folks too.
The patch boots on native 32 and 64 bit x86. I haven't done the matching Xen domain builder work but the attached
bzexplode.cis a trivial/ugly (don't judge me based on it ;-)) test app which extracts the payload, which I have been able to boot as a 32 bit Xen domU, as you'd expect.
I've got a bzImage-loading domain builder patch somewhere. It's based on my version of what you've done here, which isn't very different.
Quoted 12 lines
The payload is simply the stripped and compressed toplevel vmlinux file. I assume that ELF program headers will be ordered by physical address within the ELF file since this (and the general simplicity of the kernel ELF layout) makes the ELF "parser" pretty trivial. I think the assumption is safe because for the kernel paddr=vaddr-offset and the ELF spec says (in book I chapter 2 "Program Header"):
Loadable segment entries in the program header table appear in ascending order, sorted on thep_vaddrmember.
Slightly less obvious is if the data within the ELF file is in the same order as the program headers. I think the kernel is constrained enough that we can guarantee this.
The problem I ran into is that 32-bit boot loaders expect to be able to load the payload portion of the bzImage and simply jmp 0x100000, which would start executing the ELF header. Someone (Vivek Goyal?) did a neat/bizarre/awful hack which made the ELF header itself executable, which wasn't something I felt should live.
Quoted 4 lines
What would be the preferred way of allowing bootloaders/domain builders to find the compressed payload? Tacking the offset from the end onto the end as I have done for the moment seems pretty skanky...
The header format is extensible, so you just up the bootloader revision and put the appropriate extra members.
J
Quoted 166 lines
Ian.
x86: switch compressed payload to ELF format.
This allows other boot loaders such as the Xen domain builder the opportunity to extract the ELF file.
arch/x86/Makefile +0
-1@@ -90,7 +90,6 @@ KBUILD_AFLAGS += $(cfi) $(cfi-sigframe) KBUILD_CFLAGS += $(cfi) $(cfi-sigframe) LDFLAGS := -m elf_$(UTS_MACHINE) -OBJCOPYFLAGS := -O binary -R .note -R .comment -S # Speed up the build KBUILD_CFLAGS += -pipearch/x86/boot/Makefile +1
-0@@ -80,6 +80,7 @@ $(obj)/zImage $(obj)/bzImage: $(obj)/setup.bin \ $(call if_changed,image) @echo 'Kernel: $@ is ready' ' (#'`cat .version`')' +$(obj)/vmlinux.bin: OBJCOPYFLAGS := -O binary -R .note -R .comment -S $(obj)/vmlinux.bin: $(obj)/compressed/vmlinux FORCE $(call if_changed,objcopy)arch/x86/boot/compressed/Makefile +1
-0@@ -22,6 +22,7 @@ $(obj)/vmlinux: $(src)/vmlinux_$(BITS).lds $(obj)/head_$(BITS).o $(obj)/misc.o $ $(call if_changed,ld) @: +$(obj)/vmlinux.bin: OBJCOPYFLAGS := -R .comment --strip-all $(obj)/vmlinux.bin: vmlinux FORCE $(call if_changed,objcopy)arch/x86/boot/compressed/misc.c +71
-0@@ -15,6 +15,10 @@* we just keep it from happening */ #undef CONFIG_PARAVIRT +#ifdef CONFIG_X86_32 +#define _ASM_DESC_H_ 1 +#endif +#ifdef CONFIG_X86_64 #define _LINUX_STRING_H_ 1#define __LINUX_BITMAP_H 1@@ -22,6 +26,7 @@#include <linux/linkage.h> #include <linux/screen_info.h> +#include <linux/elf.h> #include <asm/io.h> #include <asm/page.h> #include <asm/boot.h> @@ -365,6 +370,71 @@ static void error(char *x) asm("hlt" ); } +static void parse_elf (void *output) +{ +#ifdef CONFIG_X86_64 +Elf64_Ehdr ehdr; +Elf64_Phdr *phdrs, *phdr; +#else +Elf32_Ehdr ehdr; +Elf32_Phdr *phdrs, *phdr; +#endif +int i; + +memcpy (&ehdr, output,sizeof (ehdr)); +if (ehdr.e_ident[EI_MAG0 ] !=ELFMAG0 || + ehdr.e_ident[EI_MAG1 ] !=ELFMAG1 || + ehdr.e_ident[EI_MAG2 ] !=ELFMAG2 || + ehdr.e_ident[EI_MAG3 ] !=ELFMAG3 ) + { +putstr ("Not ELF... " ); +return ; + } + +putstr ("Parsing ELF... " ); + + phdrs =malloc (sizeof (*phdrs) * ehdr.e_phnum); +if (!phdrs) +error ("Failed to allocate space for phdrs" ); + +memcpy (phdrs, output + ehdr.e_phoff,sizeof (*phdrs) * ehdr.e_phnum); + +for (i=0 ; i<ehdr.e_phnum; i++) { + phdr = &phdrs[i]; +switch (phdr->p_type) { +case PT_NULL : +putstr ("\nIgnoring PT_NULL PHDR... " ); +break ; +case PT_LOAD : +putstr ("\nProcessing PT_LOAD PHDR... " ); +memcpy ((void *)phdr->p_paddr, + output + phdr->p_offset, + phdr->p_filesz); +break ; +case PT_DYNAMIC : +putstr ("\nIgnoring PT_DYNAMIC PHDR... " ); +break ; +case PT_INTERP : +putstr ("\nIgnoring PT_INTERP PHDR... " ); +break ; +case PT_NOTE : +putstr ("\nIgnoring PT_NOTE PHDR... " ); +break ; +case PT_SHLIB : +putstr ("\nIgnoring PT_SHLIB PHDR... " ); +break ; +case PT_PHDR : +putstr ("\nIgnoring PT_PHDR PHDR... " ); +break ; +case PT_TLS : +putstr ("\nIgnoring PT_TLS PHDR... " ); +break ; +default : +putstr ("\nIgnoring unknown PHDR... " ); + } + } +} + asmlinkage void decompress_kernel(void *rmode, memptr heap,uch *input_data,unsigned long input_len,uch *output)@@ -408,6 +478,7 @@ asmlinkage void decompress_kernel(void *rmode, memptr heap,makecrc ();putstr ("\nDecompressing Linux... " );gunzip (); +parse_elf (output);putstr ("done.\nBooting the kernel.\n" );return ; }arch/x86/boot/compressed/vmlinux_32.lds +4
-0@@ -40,4 +40,8 @@ SECTIONS *(COMMON) _end = . ; } + .data.trailer : { + LONG(. - input_data + 8) payload_offset = .; + LONG(input_data_end - input_data) payload_length = .; + } }arch/x86/boot/compressed/vmlinux_64.lds +0
-0
arch/x86/boot/compressed/vmlinux_64.lds SECTIONS · line 52
Quoted 8 lines
arch/x86/boot/compressed/vmlinux_64.lds +4
-0@@ -45,4 +45,8 @@ SECTIONS . = . + 4096 * 6; _heap = .; } + .data.trailer : { + LONG(. - input_data + 8) payload_offset = .; + LONG(input_data_end - input_data) payload_length = .; + } }
tools/libxc/Makefile +1 -0
@@ -47,6 +47,7 @@ GUEST_SRCS-y += $(LIBELF_SRCS) # new domain builder GUEST_SRCS-y += xc_dom_core.c xc_dom_boot.c GUEST_SRCS-y += xc_dom_elfloader.c +GUEST_SRCS-y += xc_dom_bzimageloader.c GUEST_SRCS-y += xc_dom_binloader.c GUEST_SRCS-y += xc_dom_compat_linux.c
tools/libxc/bootparam.h new file +53 -0
53 lines not on this page · raw message
tools/libxc/xc_dom.h +3 -0
@@ -55,6 +55,7 @@ struct xc_dom_image {xen_pfn_t xenstore_pfn;xen_pfn_t shared_info_pfn;xen_pfn_t bootstack_pfn; +xen_pfn_t bootparams_pfn;xen_vaddr_t virt_alloc_end;xen_vaddr_t bsd_symtab_start;
@@ -254,6 +255,8 @@ static inline xen_pfn_t xc_dom_p2m_guestreturn dom->p2m_host[pfn]; } +char *xc_dom_guest_type (struct xc_dom_image *dom, +struct elf_binary *elf);/* --- arch bits --------------------------------------------------- */ int arch_setup_meminit (struct xc_dom_image *dom);
tools/libxc/xc_dom_bzimageloader.c new file +164 -0
164 lines not on this page · raw message
tools/libxc/xc_dom_elfloader.c +2 -2
@@ -18,8 +18,8 @@/* ------------------------------------------------------------------------ */ -static char *xc_dom_guest_type (struct xc_dom_image *dom, -struct elf_binary *elf) +char *xc_dom_guest_type (struct xc_dom_image *dom, +struct elf_binary *elf) {uint64_t machine =elf_uval (elf, elf->ehdr, e_machine);
tools/libxc/xc_dom_x86.c +39 -4
67 lines not on this page · raw message
Quoted 6 lines · Jeremy Fitzhardinge
Quoted 5 lines · Ian Campbell
I'm mainly interested in something along these lines to allow the Xen bootloader to load a bzImage so that distros don't have to maintain two kernel packages with the same basic bits in different file formats, I think it would probably be of use to the kexec and/or lguest folks too.
Quoted 8 lines
Quoted 5 lines
The patch boots on native 32 and 64 bit x86. I haven't done the matching Xen domain builder work but the attached
bzexplode.cis a trivial/ugly (don't judge me based on it ;-)) test app which extracts the payload, which I have been able to boot as a 32 bit Xen domU, as you'd expect.I've got a bzImage-loading domain builder patch somewhere. It's based on my version of what you've done here, which isn't very different.
Thanks, I'll probably make use of that patch when I come to do the domain builder bits.
Quoted 3 lines
The problem I ran into is that 32-bit boot loaders expect to be able to load the payload portion of the bzImage and simply jmp
0x100000, which would start executing the ELF header.
The payload I'm changing is the payload from the point of view of arch/x86/boot/compressed -- i.e. piggy.o which becomes part of the vmlinux in that directory (too many files called vmlinux!). I that might more accurately be described that as the "payload of the payload" from the point of view of a bzImage file or the "payload of the compressor portion" or something.
If you strip of setup_sects (+1?) from a bzImage, which I think is what you are referring above, then you end up with essentially arch/x86/boot/compressed/vmlinux (at address 0x100000 from one of the bzImage header fields) which can still be jumped to by a 32 bit bootloader. It will decompress and process the ELF bits correctly. I think this is where my patch differs from your previous version, you made the actual compressor portion an ELF file within the bzImage.
The thing which no longer works here is scanning the whole image looking for a gzip header just past setup_sects and extracting that expecting to find a raw binary because you will actually find an ELF file. I'm not sure that's an "interface" which could be expected to continue to work for all time anyway.
Quoted 7 lines
Quoted 4 lines
What would be the preferred way of allowing bootloaders/domain builders to find the compressed payload? Tacking the offset from the end onto the end as I have done for the moment seems pretty skanky...
The header format is extensible, so you just up the bootloader revision and put the appropriate extra members.
That's what I figured. There will be some build system pain to extract those offsets from boot/compressed/vmlinux and incorporate them into boot/bzImage but I'll figure something out.
Ian.
Signature · 6 lines
Ian Campbell Current Noise: Centurions Ghost - Specimen No.7 Psychoanalysis is that mental illness for which it regards itself a therapy. -- Karl Kraus
Quoted 8 lines · Ian Campbell
If you strip of
setup_sects(+1?) from a bzImage, which I think is what you are referring above, then you end up with essentiallyarch/x86/boot/compressed/vmlinux(at address0x100000from one of the bzImage header fields) which can still be jumped to by a 32 bit bootloader. It will decompress and process the ELF bits correctly. I think this is where my patch differs from your previous version, you made the actual compressor portion an ELF file within the bzImage.
Yes, that's right. The changes to make it work were a fair bit more complex than your's.
Quoted 6 lines
The thing which no longer works here is scanning the whole image looking for a gzip header just past
setup_sectsand extracting that expecting to find a raw binary because you will actually find an ELF file. I'm not sure that's an "interface" which could be expected to continue to work for all time anyway.
Who does that?
Quoted 4 lines
That's what I figured. There will be some build system pain to extract those offsets from boot/compressed/vmlinux and incorporate them into boot/bzImage but I'll figure something out.
I solved that with some linker magic. One of the things I did was get rid of tools/build and did everything in the linker. And I worked out a trick where you can get the setup code to refer to vmlinux's symbols without actually linking it in (no, wait, was that to solve something else?).
In the xenbits repo, you can see a series of patches guarded with +pvboot, which was my patchset when I last worked on it. i386-cleanup-image-generation.patch is particularly interesting (though it could definitely do with being broken into smaller patches). (xen-paravirt-boot.patch was fun to get going too, though I don't think it will be useful overall.)
J
H. Peter Anvin
reviewerQuoted 1 line · Jeremy Fitzhardinge
I solved that with some linker magic. One of the things I did was get rid of
tools/buildand did everything in the linker. And I worked out a trick where you can get the setup code to refer to vmlinux's symbols without actually linking it in (no, wait, was that to solve something else?).
It's also easy enough to either use objdump -h or nm to extract info from vmlinux; or for some of the simpler stuff, just parse the ELF directly (perhaps using libelf).
There is also the -R option to ld, which imports symbols from one executable into another.
-hpa
Quoted 3 lines · H. Peter Anvin
It's also easy enough to either use objdump -h or nm to extract info from vmlinux; or for some of the simpler stuff, just parse the ELF directly (perhaps using libelf).
There is also the -R option to ld, which imports symbols from one executable into another.
Yes, I used -R, though it was necessary to generate a copy of vmlinux with a filtered symbol list to prevent collisions. But I'm not sure any of this is necessary with Ian's approach.
J
H. Peter Anvin
reviewerQuoted 7 lines · Jeremy Fitzhardinge
Quoted 3 lines · H. Peter Anvin
It's also easy enough to either use objdump -h or nm to extract info from vmlinux; or for some of the simpler stuff, just parse the ELF directly (perhaps using libelf).
There is also the -R option to ld, which imports symbols from one executable into another.
Yes, I used -R, though it was necessary to generate a copy of vmlinux with a filtered symbol list to prevent collisions. But I'm not sure any of this is necessary with Ian's approach.
Probably isn't. He just need the start and possibly length of the payload section, which should be objdump -h or equivalently reading the ELF section table.
-hpa
Quoted 9 lines · H. Peter Anvin
Quoted 8 lines · Jeremy Fitzhardinge
Quoted 6 lines · H. Peter Anvin
It's also easy enough to either use objdump -h or nm to extract info from vmlinux; or for some of the simpler stuff, just parse the ELF directly (perhaps using libelf).
There is also the -R option to ld, which imports symbols from one executable into another.
Quoted 8 lines
Quoted 4 lines
Yes, I used -R, though it was necessary to generate a copy of vmlinux with a filtered symbol list to prevent collisions. But I'm not sure any of this is necessary with Ian's approach.
Probably isn't. He just need the start and possibly length of the payload section, which should be objdump -h or equivalently reading the ELF section table.
I'm currently using "objcopy --extract-symbol -w -N \* -K input_data" to create a .o with just the symbol I'm interested in and using -R on that. There's also an option to add a prefix to all symbols which might be useful.
I finessed the length issue slightly since it happens that the word before the payload is the payload's length. I'm mulling a variety of options:
* declare it compression scheme dependant. At least for gzip it knows when it has reached the end.
* codify the length followed by data thing we happen to have now
* add a length field to the header, using another 4 bytes (is there any pressure on the size of the header?).
I'd probably go with the later unless we are pressed for space in the header.
Ian.
Signature · 3 lines
Ian Campbell Man who falls in vat of molten optical glass makes spectacle of self.
H. Peter Anvin
reviewerQuoted 10 lines · Ian Campbell
I finessed the length issue slightly since it happens that the word before the payload is the payload's length. I'm mulling a variety of options:
* declare it compression scheme dependant. At least for gzip it knows when it has reached the end.
* codify the length followed by data thing we happen to have now
* add a length field to the header, using another 4 bytes (is there any pressure on the size of the header?).
Quoted 2 lines
I'd probably go with the later unless we are pressed for space in the header.
I would agree with that. In fact, while we're adding fields to the header, I would like to add a field that would be the CRC32 (or other simple integrity check) over the whole image.
-hpa
Quoted 13 lines · H. Peter Anvin
Quoted 5 lines · Ian Campbell
I finessed the length issue slightly since it happens that the word before the payload is the payload's length. I'm mulling a variety of options:
* declare it compression scheme dependant. At least for gzipit
Quoted 2 lines
knows when it has reached the end.
* codify the length followed by data thing we happen to havenow
Quoted 3 lines
* add a length field to the header, using another 4 bytes (is there any pressure on the size of the header?).
Quoted 7 lines
Quoted 1 line
I'd probably go with the later unless we are pressed for space in
the
Quoted 1 line
header.
I would agree with that. In fact, while we're adding fields to the header, I would like to add a field that would be the CRC32 (or other simple integrity check) over the whole image.
As in over the whole compressed payload part? I'll add that while I'm there.
Ian.
Signature · 4 lines
Ian Campbell "Jesus may love you, but I think you're garbage wrapped in skin." -- Michael O'Donohugh
H. Peter Anvin
reviewerQuoted 13 lines · Ian Campbell
Quoted 12 lines · H. Peter Anvin
Quoted 4 lines · Ian Campbell
I finessed the length issue slightly since it happens that the word before the payload is the payload's length. I'm mulling a variety of options:
* declare it compression scheme dependant. At least for gzipit
Quoted 2 lines
knows when it has reached the end.
* codify the length followed by data thing we happen to havenow
Quoted 3 lines
* add a length field to the header, using another 4 bytes (is there any pressure on the size of the header?).
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
I'd probably go with the later unless we are pressed for space in
the
Quoted 1 line
header.
I would agree with that. In fact, while we're adding fields to the header, I would like to add a field that would be the CRC32 (or other simple integrity check) over the whole image.
As in over the whole compressed payload part? I'll add that while I'm there.
I was actually thinking about the whole bzImage.
Obviously, it can't cover itself (unless it's something like a plain checksum) so presumably it would compute it with its own field set to zero.
-hpa
H. Peter Anvin
reviewerQuoted 5 lines · Ian Campbell
What would be the preferred way of allowing bootloaders/domain builders to find the compressed payload? Tacking the offset from the end onto the end as I have done for the moment seems pretty skanky...
As Jeremy already mentioned, putting a pointer to the compressed ELF image in the bzImage header (and bumping the version number to 2.08) is the right way to go about it. The compression format (for now, always gzip) can then be identified in the usual way via compression format magic number.
As I've previously expressed, I'm much happier with this approach than having the compressor portion itself be an ELF image, so I'm happy to see this patch. However, I think it needs to ride a cycle in -mm, so although I didn't see any problems from a cursory look I might not get a chance to do a detailed review until the merge window is over.
-hpa
Quoted 13 lines · H. Peter Anvin
Quoted 5 lines · Ian Campbell
What would be the preferred way of allowing bootloaders/domain builders to find the compressed payload? Tacking the offset from the end onto the end as I have done for the moment seems pretty skanky...
As Jeremy already mentioned, putting a pointer to the compressed ELF image in the bzImage header (and bumping the version number to 2.08) is the right way to go about it. The compression format (for now, always gzip) can then be identified in the usual way via compression format magic number.
Quoted 5 lines
As I've previously expressed, I'm much happier with this approach than having the compressor portion itself be an ELF image, so I'm happy to see this patch. However, I think it needs to ride a cycle in -mm, so although I didn't see any problems from a cursory look I might not get a chance to do a detailed review until the merge window is over.
That's good enough for me -- I shall press on...
Cheers,
Ian.
Signature · 6 lines
Ian Campbell Pascal: A programming language named after a man who would turn over in his grave if he knew about it. -- Datamation, January 15, 1984
Quoted 7 lines · Ian Campbell
Hi Peter,
This patch switches the payload of a bzImage file to be in compressed ELF format. There are several rough edges which need to be addressed before it could go any further but I'd be interested to hear your opinion of the general approach before I spend time cleaning it up.
Quoted 5 lines
I'm mainly interested in something along these lines to allow the Xen bootloader to load a bzImage so that distros don't have to maintain two kernel packages with the same basic bits in different file formats, I think it would probably be of use to the kexec and/or lguest folks too.
this looks quite interesting to me. Peter, what do you think?
Ingo
H. Peter Anvin
reviewerQuoted 10 lines · Ingo Molnar
Quoted 5 lines · Ian Campbell
Hi Peter,
This patch switches the payload of a bzImage file to be in compressed ELF format. There are several rough edges which need to be addressed before it could go any further but I'd be interested to hear your opinion of the general approach before I spend time cleaning it up.
I'm mainly interested in something along these lines to allow the Xen bootloader to load a bzImage so that distros don't have to maintain two kernel packages with the same basic bits in different file formats, I think it would probably be of use to the kexec and/or lguest folks too.
this looks quite interesting to me. Peter, what do you think?
Definitely the right thing, let's just get the rough edges taken care of, in particular the CRC32 bit.
-hpa
H. Peter Anvin
reviewerQuoted 5 lines · H. Peter Anvin
Quoted 4 lines · Ingo Molnar
Quoted 2 lines · Ian Campbell
Hi Peter,
Quoted 9 lines
Quoted 6 lines
Quoted 3 lines
This patch switches the payload of a bzImage file to be in compressed ELF format. There are several rough edges which need to be addressed before it could go any further but I'd be interested to hear your opinion of the general approach before I spend time cleaning it up.
I'm mainly interested in something along these lines to allow the Xen bootloader to load a bzImage so that distros don't have to maintain two kernel packages with the same basic bits in different file formats, I think it would probably be of use to the kexec and/or lguest folks too.
this looks quite interesting to me. Peter, what do you think?
Definitely the right thing, let's just get the rough edges taken care of, in particular the CRC32 bit.
Latest patch looks fine (and is already in the queue), sorry for the noise.
-hpa