[elf] Reject ELFBoot images requiring virtual addressing
authorMichael Brown <mcb30@ipxe.org>
Wed, 29 Jul 2015 13:09:34 +0000 (14:09 +0100)
committerMichael Brown <mcb30@ipxe.org>
Wed, 29 Jul 2015 13:17:09 +0000 (14:17 +0100)
commitae7f22eb28dbfdd0e4743a2d9e7aa33344a07246
tree213c19acfa06f5091360a4a12272e928eebf27c4
parent1e4ff872be639e93e8df3918a965bb08675dcc77
[elf] Reject ELFBoot images requiring virtual addressing

We do not set up any kind of virtual addressing before invoking an
ELFBoot image.  Reject if the image's program headers indicate that
virtual addresses are not equal to physical addresses.

This avoids problems when loading some RHEL5 kernels, which seem to
include ELFBoot headers using virtual addressing.  With this change,
these kernels are no longer detected as ELFBoot, and so may be
(correctly) detected as bzImage instead.

Reported-by: Torgeir.Wulfsberg@kongsberg.com
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/arch/i386/image/elfboot.c
src/image/elf.c
src/include/ipxe/elf.h