The API says that CMSG_SPACE should be used for msg_controllen, but in practice the native ABI allows you to only use CMSG_LEN for the final (typically only) control message, and real-world software does this, including Wayland. For freebsd32, this is in practice mostly harmless, since control messages are generally used to carry file descriptors, which are already 4 bytes in size and thus no padding is needed, but they can carry other quantities that may not result in an aligned length. This was discovered after CheriBSD's freebsd64 equivalent was updated to match the freebsd32 implementation, as that uses 8 byte alignment which does break the file descriptor use case, and thus Wayland. This used to be addressed by aligning buflen before the first iteration, but that allowed unwanted invalid inputs and was lost in |
||
---|---|---|
.. | ||
freebsd32 | ||
ia32 | ||
lindebugfs | ||
linprocfs | ||
linsysfs | ||
linux | ||
linuxkpi | ||
x86bios |