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
Unknown Object (File)
Sat, Oct 12, 11:35 AM
Unknown Object (File)
Tue, Oct 8, 12:43 AM
Unknown Object (File)
Mon, Oct 7, 10:13 PM
Unknown Object (File)
Oct 4 2024, 4:45 PM
Unknown Object (File)
Oct 3 2024, 7:44 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?