Do not use stock RedHat 6.0 kernels with SMBFS!

Michael H. Warfield (mhw@wittsend.com)
Wed, 9 Jun 1999 11:31:45 -0400


Ok... I reported this problem to RedHat several days
ago, so they have had at least a small chance to look it over and
be ready for this announcement. I'm continuing to hear complaints
about corrupted timestamps on smbfs mounts so this word needs to
get out.

Synopsis:

Do NOT use the stock RedHat kernels from RedHat 6.0 if
you are using SMBFS with Windows NT, Windows 2000, or Windows 98.
These kernels were incorrectly compiled with a configuration
option, the Windows 95 bug workaround, that will cause corruption
of timestamp information on shares mounted from any of those other
systems.

Details:

I'm the maintainer of smbmount in the Samba package.
Lately I've noticed a significant increase in reports of a
specific, very peculiar, problem with smbfs where timestamps
of files are corrupted. These occur on Windows NT, Windows
2000, and Windows 98 shares. The problem occurs whenever
the Windows 95 Bug Workaround is enabled in kernel builds
and those kernels are then used to mount shares from
something other than Windows 95.

Inspection of the kernel source packages on the
RedHat 6.0 source disk revealed that the stock x86 and
sparc kernels are all being built with this option enabled.
Since this is the first RedHat build with the 2.2.x kernels
and, subsequently, the first build with the Samba version of
smbmount, this problem is only just recently becoming
chronic. Up until now, people wishing to use the 2.2.x
kernels with the newer smbfs module and the newer smbmount
would have to build their own. Often, they would not
include this option and the problem would not occur. Now,
with this option enabled in stock kernels, the complaint
level is rising.

] # grep SMB_WIN95 *.config
] kernel-2.2-i386-BOOT.config:CONFIG_SMB_WIN95=y
] kernel-2.2-i386-smp.config:CONFIG_SMB_WIN95=y
] kernel-2.2-i386.config:CONFIG_SMB_WIN95=y
] kernel-2.2-i586-smp.config:CONFIG_SMB_WIN95=y
] kernel-2.2-i586.config:CONFIG_SMB_WIN95=y
] kernel-2.2-i686-smp.config:CONFIG_SMB_WIN95=y
] kernel-2.2-i686.config:CONFIG_SMB_WIN95=y
] kernel-2.2-sparc-smp.config:CONFIG_SMB_WIN95=y
] kernel-2.2-sparc.config:CONFIG_SMB_WIN95=y
] kernel-2.2-sparc64-smp.config:CONFIG_SMB_WIN95=y
] kernel-2.2-sparc64.config:CONFIG_SMB_WIN95=y

The Windows 95 Bug Workaround forces "ON" some protocol
hacks to work around bugs in Windows 95. The code for this hack
is in the kernel even if this option is disabled. If the option
is disabled, the bug workaround is "OFF" by default but can be
enabled with a mount time option. If the Windows 95 Bug Workaround
is enabled when the kernel is compiled, this code is forced "ON"
with no way to disable it. This code is strictly for Windows 95
shares and causes havoc with Windows NT, Windows 2000, and Windows 98
shares. Specifically, it causes the bytes in the file timestamps to
be reversed. The results in timestamps which appear to be garbage.
Attempts to use timestamp dependent utilities (such as Make) result
in random acts of terrorism and errors.

The Windows 95 Bug Workaround should be enabled in the
kernel build IF AND ONLY IF all of the shares which will be mounted
by smbfs are only and will only ever be from Windows 95 systems.
If there is any chance that a share from a Windows NT, Windows 2000,
or Windows 98 system may be mounted by smbfs, the Windows 95 Bug
Workaround option in the kernel build MUST NOT BE ENABLED!

Fix:

Anyone using RedHat 6.0 with smbfs must recompile and reinstall
their kernels with the Windows 95 Bug Workaround disabled. Hopefully,
RedHat will make kernel RPMs available shortly with the fix incorporated.

Disclaimer:

This is a known problem in RedHat 6.0. It may also be a problem
in other distributions. I have not determined the extent of the problem
in other distributions and investigation is continuing. If you are using
another distribution, other than RedHat 6.0, and are experiencing this
problem with their stock kernels, please contact me and them.

This problem may also have been present with the SMBFS module
and smbmount program from the 2.0 kernels. Since I do not maintain
that version of smbmount, I'm unaware if the problem existed in those
earlier versions or not.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/