Project

General

Profile

Bug #6579

installgrub efi_alloc_and_read() return value check is faulty

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

Status:
Closed
Priority:
Normal
Assignee:
Category:
cmd - userland programs
Start date:
2016-01-25
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
needs-triage
Gerrit CR:

Description

installgrub is assuming 0 is failure from reading EFI label, but it is not so, 0 is perfectly legal value while reading whole disk device such as c0t0d0p0. efi_read() used by efi_alloc_and_read() is using DKIOCINFO to get partition number, and p0 has no partition, so 0 is legal there. For example, prtvtoc(1M) is interpreting this return value correctly.

History

#1

Updated by Electric Monk over 4 years ago

  • % Done changed from 0 to 100
  • Status changed from New to Closed

git commit cc641e8dc4d38800076a2260f4d959bf86003257

commit  cc641e8dc4d38800076a2260f4d959bf86003257
Author: Toomas Soome <tsoome@me.com>
Date:   2016-01-26T22:36:59.000Z

    6579 installgrub efi_alloc_and_read() return value check is faulty
    Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com>
    Reviewed by: Andrew Stormont <andyjstormont@gmail.com>
    Reviewed by: Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>
    Approved by: Robert Mustacchi <rm@joyent.com>

Also available in: Atom PDF