HomeFreeBSD

In the recvmsg32() system call iterate over returned structure(s)

Description

In the recvmsg32() system call iterate over returned structure(s)
and convert any messages of types SCM_BINTIME, SCM_TIMESTAMP,
SCM_REALTIME and SCM_MONOTONIC from 64-bit to its 32-bit
representation. Otherwise we either run out of user-supplied
buffer to copy those out resulting in the MSG_CTRUNC or simply
return values that the userland 32-bit code is not going
to parse correctly. This fixes at least two regression tests
failing to function properly in 32-bit compat mode:

tools/regression/sockets/udp_pingpong
tools/regression/sockets/unix_cmsg

PR: kern/222039
MFC after: 30 days

Details

Provenance
sobomaxAuthored on
Parents
rS323253: Add D definitions for the named values in socket.h
Branches
Unknown
Tags
Unknown