Page MenuHomeFreeBSD

bhyve: Fix truncate_iov()
ClosedPublic

Authored by markj on Feb 22 2026, 4:16 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Apr 28, 6:23 AM
Unknown Object (File)
Mon, Apr 27, 12:58 PM
Unknown Object (File)
Fri, Apr 24, 9:23 PM
Unknown Object (File)
Sun, Apr 19, 9:47 PM
Unknown Object (File)
Sun, Apr 12, 6:32 PM
Unknown Object (File)
Tue, Apr 7, 6:03 PM
Unknown Object (File)
Sun, Apr 5, 1:10 PM
Unknown Object (File)
Mar 29 2026, 12:52 PM

Details

Summary

The implementation was simply wrong. It would always just return the
first entry in the iovec, even if the requested length is larger than
that first entry.

Note, this function will be removed soon, see D53468.

Reported by: Vinod p n <vinod272@gmail.com>

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

markj requested review of this revision.Feb 22 2026, 4:16 PM
This revision is now accepted and ready to land.Feb 22 2026, 6:31 PM
des added inline comments.
usr.sbin/bhyve/iov.c
87

I found this slightly confusing...

(personally I would have dropped done and just decremented length until it reached 0)

Take Dag-Erling's suggestions.

This revision now requires review to proceed.Feb 23 2026, 12:50 AM
This revision is now accepted and ready to land.Feb 23 2026, 1:50 AM
This revision was automatically updated to reflect the committed changes.