Page MenuHomeFreeBSD

loader: efipart should check disk size from partition table
ClosedPublic

Authored by tsoome on Mar 30 2017, 11:38 AM.
Tags
None
Referenced Files
F149333051: D10197.id26816.diff
Mon, Mar 23, 7:51 PM
Unknown Object (File)
Tue, Mar 17, 3:40 AM
Unknown Object (File)
Tue, Mar 17, 3:39 AM
Unknown Object (File)
Mon, Mar 16, 6:33 AM
Unknown Object (File)
Sun, Mar 15, 10:07 AM
Unknown Object (File)
Tue, Mar 10, 9:00 AM
Unknown Object (File)
Tue, Mar 10, 9:00 AM
Unknown Object (File)
Tue, Mar 10, 9:00 AM
Subscribers
None

Details

Summary

While testing 32bit UEFI OVMF (which has bug about how the disk size
is presented), I did witness the errors from blkio->ReadBlocks().

It became apparent we can not entirely trust UEFI interfaces either,
so additional checks are needed.

So we use disk_ioctl(DIOCGMEDIASIZE) for disks, with fallback of
Media->LastBlock for other media.

In addition, we need to check if there is media present.

+ small fixes for error printout, and avoiding multiple blk * 512.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 8388
Build 8664: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Mar 30 2017, 3:47 PM
This revision was automatically updated to reflect the committed changes.