Project

General

Profile

Bug #9529

libefi: efi_alloc_and_read should check for PMBR

Added by Toomas Soome about 1 year ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
lib - userland libraries
Start date:
2018-05-10
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:

Description

The efi_alloc_and_read() is supposed to read the EFI (GPT) partition table, unfortunately it is possible, we get fabricated table (that is, generated in memory and not yet written down on device).

The one possible way around this issue is to verify if we have protective mbr on device (see 5 GUID Partition Table (GPT) Disk Layout, page 125, UEFI Specification v2.7). By inspecting the LBA0, we can implement the preliminary check for partition table.

As an side effect, the ufs mkfs code does need update for device size detection.

https://www.illumos.org/rb/r/348/

History

#1

Updated by Electric Monk about 1 year ago

  • % Done changed from 90 to 100
  • Status changed from In Progress to Closed

git commit fe12dc752b42da16028a16f4226e5295506fdb28

commit  fe12dc752b42da16028a16f4226e5295506fdb28
Author: Toomas Soome <tsoome@me.com>
Date:   2018-06-01T17:19:41.000Z

    9529 libefi: efi_alloc_and_read should check for PMBR
    Reviewed by: Yuri Pankov <yuripv@yuripv.net>
    Reviewed by: Alexander Eremin <alexander.eremin@nexenta.com>
    Approved by: Robert Mustacchi <rm@joyent.com>

Also available in: Atom PDF