Page MenuHomeFreeBSD

Fix ISP_FC_LIP and ISP_RESCAN on big-endian 64-bit systems.
ClosedPublic

Authored by brooks on Mar 12 2018, 9:25 PM.
Tags
None
Referenced Files
F106016408: D14673.diff
Mon, Dec 23, 11:17 PM
Unknown Object (File)
Nov 4 2024, 11:21 PM
Unknown Object (File)
Sep 21 2024, 5:46 PM
Unknown Object (File)
Sep 20 2024, 10:15 AM
Unknown Object (File)
Sep 20 2024, 5:12 AM
Unknown Object (File)
Sep 17 2024, 11:59 AM
Unknown Object (File)
Sep 8 2024, 9:31 PM
Unknown Object (File)
Sep 8 2024, 11:21 AM
Subscribers

Details

Summary

For _IO() ioctls, addr is a pointer to uap->data which is a caddr_t.
When the caddr_t stores an int, dereferencing addr as an (int *) results
in truncation on little-endian 64-bit systems and corruption (owing to
extracting top bits) on big-endian 64-bit systems. In practice the
value of chan was probably always zero on systems of the latter type.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 15528
Build 15569: arc lint + arc unit

Event Timeline

It makes some sense to me, but I suspect that this code is generally dead, since I don't know any user-space tool using it. Ken, do you?

This revision is now accepted and ready to land.Mar 12 2018, 9:46 PM
brooks retitled this revision from Fix ISP_FC_LIP and ISP_RESCAN on big-endian 64-bit systemss to Fix ISP_FC_LIP and ISP_RESCAN on big-endian 64-bit systems..Mar 12 2018, 11:05 PM
This revision was automatically updated to reflect the committed changes.