diff options
| author | Toomas Soome <tsoome@me.com> | 2017-11-29 18:04:01 +0200 |
|---|---|---|
| committer | Dan McDonald <danmcd@joyent.com> | 2017-12-04 12:04:51 -0500 |
| commit | 6c6e04f2699a6755d7a29e6fc1679b292600616c (patch) | |
| tree | 2b3943c0790f414eac6a60147b113ab024b7c4cb | |
| parent | 862246c1516ca78c11bef09650987f3d7171b2c9 (diff) | |
| download | illumos-joyent-6c6e04f2699a6755d7a29e6fc1679b292600616c.tar.gz | |
8875 loader.efi: efipart should exclude iPXE stub block protocol
Reviewed by: Jason King <jason.brian.king@gmail.com>
Approved by: Dan McDonald <danmcd@joyent.com>
| -rw-r--r-- | usr/src/boot/sys/boot/efi/libefi/efipart.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/usr/src/boot/sys/boot/efi/libefi/efipart.c b/usr/src/boot/sys/boot/efi/libefi/efipart.c index 347c14f68a..2640201698 100644 --- a/usr/src/boot/sys/boot/efi/libefi/efipart.c +++ b/usr/src/boot/sys/boot/efi/libefi/efipart.c @@ -239,6 +239,16 @@ efipart_hdd(EFI_DEVICE_PATH *dp) !blkio->Media->MediaPresent) { return (false); } + + /* + * We assume the block size 512 or greater power of 2. + * iPXE is known to insert stub BLOCK IO device with + * BlockSize 1. + */ + if (blkio->Media->BlockSize < 512 || + !powerof2(blkio->Media->BlockSize)) { + return (false); + } } return (true); } |
