call etherbridge_up and _down in nvgre_up and _down.
etherbridge_up is needed to start aging entries in the etherbridge code.
reported by tom smyth
"looks good" jmatthew@
vmd(8): Actually check alignment
The alignment check tested offset and xfer_sz with &&, so it only
rejected a request when both were misaligned. offset is now always a
multiple of VIRTIO_BLK_SECTOR_SIZE, so that half is dead code; check
xfer_sz alone and fail when it is not a multiple of the sector size.
Also report the correct direction in the warning.
ok dv@
vmd(8): Reject vioblk requests beyond the disk capacity
vioblk_io() converted the guest-controlled sector to a byte offset and
passed it to the backend without comparing it against the disk capacity.
With a raw image on a regular file, pwritev() extends the file, so a
privileged guest could write past the configured size and exhaust the
host filesystem.
Pass the sector number to vioblk_io() as an unsigned value and defer the
conversion to a byte offset until after the bounds check. Once the full
transfer length is known, reject a start beyond capacity or a transfer
that crosses the end, then convert to off_t. The check is done in
unsigned arithmetic; the subtraction order avoids underflow and it never
multiplies the attacker-controlled sector.
From Acts1631, thanks!
ok dv@
Convert checkdisklabel() into a wrapper around a call to the
new checklabel() with a partition limit of MAXPARTITIONS16.
No functional change.
Prodded by deraadt@