summaryrefslogtreecommitdiffstats
path: root/src/usr
diff options
context:
space:
mode:
authorMichael Brown2015-08-21 16:04:31 +0200
committerMichael Brown2015-08-21 16:13:19 +0200
commitfb4ce72e64f14576f51d652ad949dabaced7b45e (patch)
treef729163844781dc48f71c8d9cfb7d8c78e1d5e70 /src/usr
parent[dhcp] Ignore ProxyDHCPACKs without PXE options (diff)
downloadipxe-fb4ce72e64f14576f51d652ad949dabaced7b45e.tar.gz
ipxe-fb4ce72e64f14576f51d652ad949dabaced7b45e.tar.xz
ipxe-fb4ce72e64f14576f51d652ad949dabaced7b45e.zip
[pxe] Warn about PXE NBPs that may be EFI executables
A relatively common user mistake is to attempt to boot an EFI executable (such as grub.efi) using a BIOS version of iPXE. Unfortunately there are no signature checks that we can use to unambiguously identify a PXE NBP, since a PXE NBP is just raw machine code. We therefore have to accept anything sufficiently small to fit into base memory as a valid PXE NBP. We can detect that a file might be an EFI executable by checking for the initial "MZ" signature bytes. This does not necessarily preclude the file from also being a PXE NBP (since it would be possible to create a hybrid binary which acts as both an EFI executable and a PXE NBP, similar to the way in which wimboot and the Linux kernel are hybrid binaries which act as both an EFI executable and a bzImage). If the initial "MZ" signature bytes are present, then attempt to warn the user by setting the image type to "PXE-NBP (may be EFI?)". We can't (sensibly) prevent the user from accidentally running an EFI executable as a PXE NBP, but we can at least make it easier for the user to identify their mistake. Inspired-by: Robin Smidsrød <robin@smidsrod.no> Inspired-by: Wissam Shoukair <wissams@mellanox.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/usr')
0 files changed, 0 insertions, 0 deletions