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)
Wed, Feb 4, 11:35 PM
Unknown Object (File)
Tue, Jan 27, 3:30 PM
Unknown Object (File)
Sun, Jan 25, 9:37 PM
Unknown Object (File)
Sat, Jan 24, 7:41 PM
Unknown Object (File)
Dec 22 2025, 10:44 PM
Unknown Object (File)
Nov 21 2025, 12:02 AM
Unknown Object (File)
Nov 21 2025, 12:01 AM
Unknown Object (File)
Nov 21 2025, 12:01 AM
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

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 8928
Build 9318: arc lint + arc unit

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.