mount_smbfs is not included with base arm builds since libsmb uses casts to u_short that result in unaligned access to memory. Patch attached. Fix: The following patch replaces potential unaligned access in libsmb with a function call to the internal function memsetw(), and adds libsmb and mount_smbfs to the base build.
I just stumbled across this PR while researching an old mail thread related to the fix I just did for the same problem, so I'll take this. My solution is different than the one submitted with this PR, in that it avoids dealing with 16-bit values at all. It's available for review/testing at https://reviews.freebsd.org/D4622
A commit references this bug: Author: ian Date: Mon Dec 21 17:17:00 UTC 2015 New revision: 292552 URL: https://svnweb.freebsd.org/changeset/base/292552 Log: Avoid unaligned memory accesses when encoding netbios names in libsmb. The current code for encoding a netbios name converts each byte to a 16-bit value and stores the result by casting a char* to u_short*, resulting in alignment faults on strict-alignment platforms. This change reimplements the encoding routine using only byte accesses to memory. There is no particular reason to work with 16-bit values just because the encoding process creates two bytes of output for every byte of input. Working a byte at at time also avoids endian problems for big-endian platforms. PR: 180438 PR: 189415 Differential Revision: https://reviews.freebsd.org/D4622 Changes: head/contrib/smbfs/lib/smb/nb_name.c
A commit references this bug: Author: ian Date: Mon Dec 21 17:41:09 UTC 2015 New revision: 292553 URL: https://svnweb.freebsd.org/changeset/base/292553 Log: Make the building of libsmb and mount_smbfs unconditional, now that r292552 has eliminated alignment and endian problems that were making it fail on some platforms. PR: 180438 PR: 189415 Changes: head/lib/Makefile head/usr.sbin/Makefile head/usr.sbin/Makefile.amd64 head/usr.sbin/Makefile.arm head/usr.sbin/Makefile.i386 head/usr.sbin/Makefile.powerpc head/usr.sbin/Makefile.sparc64
A commit references this bug: Author: ian Date: Tue Jan 19 23:36:50 UTC 2016 New revision: 294364 URL: https://svnweb.freebsd.org/changeset/base/294364 Log: MFC r292337, r292552, r292553: Build mount_smbfs for arm. Also sort the subdirs. Avoid unaligned memory accesses when encoding netbios names in libsmb. The current code for encoding a netbios name converts each byte to a 16-bit value and stores the result by casting a char* to u_short*, resulting in alignment faults on strict-alignment platforms. This change reimplements the encoding routine using only byte accesses to memory. There is no particular reason to work with 16-bit values just because the encoding process creates two bytes of output for every byte of input. Working a byte at at time also avoids endian problems for big-endian platforms. Make the building of libsmb and mount_smbfs unconditional, now that r292552 has eliminated alignment and endian problems that were making it fail on some platforms. PR: 180438 PR: 189415 Relnotes: Yes Changes: _U stable/10/ stable/10/contrib/smbfs/lib/smb/nb_name.c stable/10/lib/Makefile stable/10/usr.sbin/Makefile stable/10/usr.sbin/Makefile.amd64 stable/10/usr.sbin/Makefile.arm stable/10/usr.sbin/Makefile.i386 stable/10/usr.sbin/Makefile.ia64 stable/10/usr.sbin/Makefile.powerpc stable/10/usr.sbin/Makefile.sparc64