RFC ELF Relocatable x86 bzImage (V2)
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest12 patches 64 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/12 | i386: Distinguish absolute symbolsarch/ include/ | +60 | 4 replies | |
| 2/12 | i386: align data section to 4K boundaryarch/ | +1 | 2 replies | |
| 3/12 | i386: Force section size to be non-zero to prevent a symbol becoming absolutearch/ | +15 | 5 replies | |
| 4/12 | i386: define __pa_symbol()include/ | +6 | 4 replies | |
| 5/12 | i386 setup.c: Reserve kernel memory starting from _textarch/ | +2 | 0 replies | |
| 6/12 | i386: CONFIG_PHYSICAL_START cleanuparch/ arch/ arch/ +1 more | +9 | 4 replies | |
| 7/12 | Make linux/elf.h safe to be included in assembly filesinclude/ | +21 | 0 replies | |
| 8/12 | elf: Add ELFOSABI_STANDALONE to elf.hinclude/ | +3 | 0 replies | |
| 9/12 | kallsyms: Generate relocatable symbolsarch/ arch/ arch/ +5 more | +24 | 0 replies | |
| 10/12 | i386: Relocatable kernel supportarch/ arch/ arch/ +7 more | +920 | 0 replies | |
| 11/12 | i386: Implement CONFIG_PHYSICAL_ALIGNarch/ arch/ arch/ +2 more | +43 | 0 replies | |
| 12/12 | i386 boot: Add an ELF header to bzImagearch/ arch/ arch/ +1 more | +301 | 45 replies |
Reviews trailers per patch
None of the 12 patches has a Reviewed-by or Acked-by.
| Patch | Eric Biederman |
|---|---|
| 1/12 | |
| 2/12 | |
| 3/12 | |
| 4/12 | |
| 5/12 | |
| 6/12 | |
| 7/12 | |
| 8/12 | |
| 9/12 | |
| 10/12 | |
| 11/12 | |
| 12/12 | Singed-off-by Singed-off-by Singed-off-by |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [RFC][PATCH 0/12] ELF Relocatable x86 bzImage (V2)
Hi,
Eric biederman implemented the relocatable kernel support for x86 and x86_64 and posted the patches for comments almost two months back.
http://marc.theaimsgroup.com/?l=linux-kernel&m=115443019026302&w=2
We have been testing the patches in RHEL kernels since then and things are looking up. I think this is the time that patches can be included in -mm and get more testing done and get rest of the issues sorted out.
Eric is currently held up with other things, so I have taken his patches and forward ported to 2.6.18-git19. Did some minor cleanups and fixed a couple of bugs as faced in our testing. I have also accomodated the review comments received last time.
Currently this patch series is only for i386. I will be posting the patches for x86_64 later.
Following is a brief account of changes I have done since last time.
o Forward ported the patches to 2.6.18-git19
o Replaced CONFIG_PHYSICAL_START with CONFIG_PHYSICAL_ALIGN
o Added a patch to prevent section relative symbols becoming absolute for sections with zero size.
o Dropped support for serial output debugging in decompressor code for the time being as per the discussion last time.
o Added symbol _text to few architectures so that compilation does not break
o Fix a typo in config option (CONFIG_RELOCTABLE). It was causing wrong pice of code to be executed and second kernel was stomping over first kernel's data.
o Modified __pa_symbol() definition as per Andi's comment.
o Put --emit-relocs undef #ifdef, so that relocation sections are not retained of CONFIG_RELOCATABLE is not set.
o Made symbol _end_rodata also section relative.
o Align .data section to 4K address otherwise data segment is loaded at a non-4K aligned boundary and kexec-tools do the check.
Following is the text from Eric's last post to refresh memory that why do we need a relocatable kernel.
The problem:
We can't always run the kernel at 1MB or 2MB, and so people who need different addresses must build multiple kernels. The bzImage format can't even represent loading a kernel at other than it's default address. With kexec on panic now starting to be used by distros having a kernel not running at the default load address is starting to become common.
The goal of this patch series is to build kernels that are relocatable at run time, and to extend the bzImage format to make it capable of expressing a relocatable kernel.
In extending the bzImage format I am replacing the existing unused bootsector with an ELF header. To express what is going on the ELF header will have type ET_DYN. Just like the kernel loading an ET_DYN executable bootloaders are not expected to process relocations. But the executable may be shifted in the address space so long as it's alignment requirements are met.
The i386 kernel is built to process relocations generated with --emit-relocs (after vmlinux.lds.S) has been fixed up to sort out static and dynamic relocations.
Thanks
Vivek