Page MenuHomeFreeBSD

bhyve: mark additional functions as __result_use_check
Needs ReviewPublic

Authored by khorben_defora.org on Oct 2 2024, 11:05 PM.
Tags
Referenced Files
F108745188: D46883.id144158.diff
Mon, Jan 27, 4:40 PM
Unknown Object (File)
Wed, Jan 22, 8:03 PM
Unknown Object (File)
Tue, Jan 21, 11:26 AM
Unknown Object (File)
Thu, Jan 2, 5:51 PM
Unknown Object (File)
Nov 28 2024, 6:55 AM
Unknown Object (File)
Nov 25 2024, 1:26 AM
Unknown Object (File)
Nov 17 2024, 5:07 PM
Unknown Object (File)
Nov 9 2024, 2:47 AM
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?