Bug #9260
nsmb driver 32-bit ioctl check broken after 8685
100%
Description
The nsmb driver uses ioctl data structures that have been carefully designed to to have layouts that are invariant between 32-bit and 64-bit user-level callers.
This avoids any need for the in-kernel copyin/copyout code in nsmb to deal with converting 32-bit ioctl structures to 64-bit (in-kernel) versions.
There is some build-time machinery to verify that ioctl structure layout invariance. See:
http://src.illumos.org/source/xref/illumos-gate/usr/src/uts/intel/nsmb/Makefile
http://src.illumos.org/source/xref/illumos-gate/usr/src/uts/intel/nsmb/ioc_check.ref
http://src.illumos.org/source/xref/illumos-gate/usr/src/uts/common/fs/smbclnt/netsmb/offsets.in
Now that we only build kernel components 64-bit, that Makefile needs work
so it can create the 32-bit ioc_check.h and compare it with the reference.
Probably can (mostly) copy usr/src/uts/sparc/nsmb/Makefile
which already deals with this situation.
Related issues
Updated by Electric Monk almost 3 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
git commit bbbed746ed07daa0e18f08cf6145bb3f2b063f24
commit bbbed746ed07daa0e18f08cf6145bb3f2b063f24 Author: Gordon Ross <gwr@nexenta.com> Date: 2018-03-14T18:52:14.000Z 9260 nsmb driver 32-bit ioctl check broken after 8685 Reviewed by: Igor Kozhukhov <igor@dilos.org> Reviewed by: Toomas Soome <tsoome@me.com> Approved by: Joshua M. Clulow <josh@sysmgr.org>
Updated by Gordon Ross almost 3 years ago
Notes about the fix:
Revert changes in usr/src/uts/Makefile.\{targ,uts\}
Let uts/intel/Makefile.intel define \{ALL,DEF\}\_BUILDS for 32-bit only,
Also the platform makefiles: uts/i86pc/Makefile.\* etc.
(Similar to how sparc handled that.)
Add logic to intel/nsmb/Makefile like sparc had to run just the
necessary part of the 32-bit build for the ioctl check.
Updated by Marcel Telka over 1 year ago
- Related to Feature #8685: uts and mdb: do not build 32bit kernel added