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

Details

Provenance
markjAuthored on Dec 27 2023, 3:13 PM
Reviewer
vmaffione
Differential Revision
D43200: netmap: Ignore errors in CSB_WRITE()
Parents
rGb9924c202fc3: linux: Check for copyout errors in ioctl handlers
Branches
Unknown
Tags
Unknown