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)
Wed, Feb 26, 7:43 PM
Unknown Object (File)
Feb 8 2025, 1:50 AM
Unknown Object (File)
Jan 28 2025, 7:46 PM
Unknown Object (File)
Jan 27 2025, 4:40 PM
Unknown Object (File)
Jan 22 2025, 8:03 PM
Unknown Object (File)
Jan 21 2025, 11:26 AM
Unknown Object (File)
Jan 2 2025, 5:51 PM
Unknown Object (File)
Nov 28 2024, 6:55 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?