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

Also available in: Atom PDF