HomeFreeBSD

netmap: Ignore errors in CSB_WRITE()

Description

netmap: Ignore errors in CSB_WRITE()

The CSB_WRITE() and _READ() macros respectively write to and read from
userspace memory and so can in principle fault. However, we do not
check for errors and will proceed blindly if they fail. Add assertions
to verify that they do not.

This is in preparation for annotating copyin() and related functions
with __result_use_check.

Reviewed by: vmaffione
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D43200

(cherry picked from commit 99efa2c88d93c6272a8f54b18d18d0fd9d60f137)

Details

Provenance
markjAuthored on Dec 27 2023, 3:13 PM
Reviewer
vmaffione
Differential Revision
D43200: netmap: Ignore errors in CSB_WRITE()
Parents
rG3e53fec0027e: fb: Explicitly handle errors when getting or setting a colour palette
Branches
Unknown
Tags
Unknown