]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r330876, r330945
authorbrooks <brooks@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Tue, 27 Mar 2018 17:48:39 +0000 (17:48 +0000)
committerbrooks <brooks@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Tue, 27 Mar 2018 17:48:39 +0000 (17:48 +0000)
commit464b05b284bc5cb79a5b45804a76ea6043a96a46
tree70bb66c90d5c6e76cf2d34f03e915b2275429b4d
parenta3b37fc012714817d3b214bb36b140f959a0802a
MFC r330876, r330945

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

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 as
all such FreeBSD platforms use a register-based calling convention.

Reviewed by: mav
Obtained from: CheriBSD
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D14673

r330945:
Add opt_compat.h to isp(4) as required by r330876.

git-svn-id: svn://svn.freebsd.org/base/stable/10@331635 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/dev/isp/isp_freebsd.c
sys/modules/isp/Makefile