HomeFreeBSD

loader: disk/part api needs to use uint64_t offsets

Description

loader: disk/part api needs to use uint64_t offsets

The disk_* and part_* api is using 64bit values for media size and
offsets. However, the current api is using off_t type, which is signed
64-bit int.

In this context the signed media size does not make any sense, and
the offsets are used to mark absolute, not relative locations.

Also, the data from GPT partition table and some other sources is
already using uint64_t data type, so using signed off_t can cause sign
issues.

Reviewed by: imp
Approved by: imp (mentor)
Differential Revision: https://reviews.freebsd.org/D8710

Details

Provenance
tsoomeAuthored on
Reviewer
imp
Differential Revision
D8710: loader: disk/part api needs to use uint64_t offsets
Parents
rS313046: Fix out of bounds of the requests array due to wrong check.
Branches
Unknown
Tags
Unknown