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)
Mon, Apr 13, 2:57 AM
Unknown Object (File)
Thu, Apr 9, 9:26 PM
Unknown Object (File)
Wed, Apr 8, 9:08 PM
Unknown Object (File)
Wed, Apr 8, 11:21 AM
Unknown Object (File)
Mon, Apr 6, 11:33 PM
Unknown Object (File)
Mon, Apr 6, 5:31 AM
Unknown Object (File)
Sun, Apr 5, 4:50 PM
Unknown Object (File)
Sat, Apr 4, 2:02 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.