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
F156638733: D46883.id.diff
Fri, May 15, 7:29 AM
F156594852: D46883.id144158.diff
Thu, May 14, 11:22 PM
Unknown Object (File)
Wed, May 13, 5:42 PM
Unknown Object (File)
Wed, May 13, 5:28 PM
Unknown Object (File)
Tue, May 12, 8:58 AM
Unknown Object (File)
Wed, Apr 29, 8:35 AM
Unknown Object (File)
Wed, Apr 29, 8:28 AM
Unknown Object (File)
Thu, Apr 23, 8:05 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?