Page MenuHomeFreeBSD

systm: Annotate copyin() and related functions with __result_use_check
ClosedPublic

Authored by markj on Dec 28 2023, 5:37 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Jun 24, 9:56 AM
Unknown Object (File)
May 15 2024, 4:43 PM
Unknown Object (File)
May 10 2024, 3:50 AM
Unknown Object (File)
May 9 2024, 10:48 PM
Unknown Object (File)
May 9 2024, 8:52 PM
Unknown Object (File)
May 9 2024, 6:20 PM
Unknown Object (File)
May 5 2024, 11:19 AM
Unknown Object (File)
Feb 12 2024, 12:05 AM
Subscribers
None

Details

Summary

Now that all in-tree callers check for errors (or cast them away), we
can ask the compiler to check that new code does the same. This was
prompted by SA-23:18.nfsclient, which was caused by missing error
handling. This change is a weak mitigation since code can easily fail
to propagate error handling to the right place, but it's better than
nothing.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

markj requested review of this revision.Dec 28 2023, 5:37 PM
markj created this revision.

There are three more patches in review that need to be committed before this can land.

I'll also request an exp-run to see if any kmod ports fall over. I tried a few popular ones already and didn't hit any build failures.

This revision is now accepted and ready to land.Dec 28 2023, 6:36 PM