HomeFreeBSD

if_urndis: Organize buffer layouts more naturally

Description

if_urndis: Organize buffer layouts more naturally

  • Group the request header and I/O buffer in one structure, rather than assuming that both request structures have the same size.
  • Pass a pointer to the whole structure to urndis_ctrl_query() and urndis_ctrl_set() rather than just the header. Otherwise, on CHERI platforms, these functions violate subobject bounds since they modify the buffer following the header.

While here, there is no apparent reason for the request structure used
in urndis_attach() to be allocated statically. Change it so that it's
allocated on the stack.

No functional change intended.

Reviewed by: jhb
MFC after: 2 weeks
Sponsored by: Innovate UK
Differential Revision: https://reviews.freebsd.org/D45866

Details

Provenance
markjAuthored on Jul 9 2024, 2:10 PM
Reviewer
jhb
Differential Revision
D45866: if_urndis: Organize buffer layouts more naturally
Parents
rG9207f9d206a4: bnxt_re: User library support for RoCE driver
Branches
Unknown
Tags
Unknown