Page MenuHomeFreeBSD

bhyve: mark additional functions as __result_use_check
Needs ReviewPublic

Authored by khorben on Oct 2 2024, 11:05 PM.
Tags
Referenced Files
Unknown Object (File)
Sat, Nov 29, 9:50 PM
Unknown Object (File)
Tue, Nov 11, 7:14 AM
Unknown Object (File)
Nov 4 2025, 5:56 AM
Unknown Object (File)
Nov 3 2025, 8:17 PM
Unknown Object (File)
Oct 14 2025, 5:00 AM
Unknown Object (File)
Sep 16 2025, 10:38 PM
Unknown Object (File)
Sep 3 2025, 3:54 PM
Unknown Object (File)
Aug 19 2025, 9:52 PM
Subscribers

Details

Reviewers
emaste
markj
Group Reviewers
bhyve
Summary

This is a follow-up to ef9fc9609a1ff53047577aa7cf51246fc04c954b, teaching users of vm_map_gpa() and vm_rev_map_gpa() to check the results obtained. In turn, this applies to paddr_guest2host() and paddr_host2guest().

Sponsored by: The FreeBSD Foundation

Test Plan

Build-tested in lib/libvmmapi and usr.sbin/bhyve; NFCI.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

From a style perspective, the use of __result_use_check is inconsistent, in one file it appears at the end, in the other it appears right after the return type. I think some of the lines are also over 80 colums.

I also don't really understand the change... the annotated functions return a value, not an error status. Were/are there callers that ignore the return value?