Page MenuHomeFreeBSD

Don't pass size_t arguments to setsockopt(SO_SNDBUF/SO_RCVBUF).
ClosedPublic

Authored by brooks on Apr 27 2017, 12:31 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 21, 12:02 AM
Unknown Object (File)
Fri, Nov 21, 12:01 AM
Unknown Object (File)
Fri, Nov 21, 12:01 AM
Unknown Object (File)
Thu, Nov 20, 11:57 PM
Unknown Object (File)
Sun, Nov 16, 10:32 AM
Unknown Object (File)
Sun, Nov 16, 5:47 AM
Unknown Object (File)
Mon, Nov 10, 3:53 AM
Unknown Object (File)
Oct 24 2025, 6:36 PM
Subscribers
None

Details

Summary

These command take an int. The tests work by accident on little-endian
systems.

Tested with: qemu-cheri and CheriBSD built for mips64
Obtained from: CheriBSD
Sponsored by: DARPA, AFRL
MFC after: 1 week

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Oops. LGTM. This seems like a good candidate for a Coverity check.

This revision is now accepted and ready to land.Apr 27 2017, 2:44 AM

I've added a not even compiled change in D10519 which would have caught this.

Could you please add testing done on the Cheri emulator?

In D10518#217952, @ngie wrote:

Could you please add testing done on the Cheri emulator?

I'm not sure what you're asking. FYI, this is broken on all big-endian 64-bit systems.

This revision was automatically updated to reflect the committed changes.