Project

General

Profile

Actions

Bug #9529

closed

libefi: efi_alloc_and_read should check for PMBR

Added by Toomas Soome over 4 years ago. Updated over 4 years ago.

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

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:

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/

Actions #1

Updated by Electric Monk over 4 years ago

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

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>

Actions

Also available in: Atom PDF