Enable CONFIG_CIFS_SMB2 and CONFIG_CIFS_SMB311 on Linux 4.4.140
2 Attachment(s)
All --
I tried enabling CONFIG_CIFS_SMB2 and CONFIG_CIFS_SMB311 for Linux 4.4.140 on my Slackware64 14.2 Laptop after reading this LQ thread: https://www.linuxquestions.org/quest...nt-4175633789/ As I reported in lukameen's thread, I lost my Synaptics Touchpad when I did. Yesterday's Slackware 14.2+current kernel-firmware update made me wonder if I needed to update the firmware to fix my issue with the Touchpad. I updated my Firmware and then the Touchpad worked for my Laptop ! Attached are my HUGE and GENERIC Configs I'll be disabling SMBv1 on a Windows 10 Test Box to see if I can now mount the share with the mount options { vers=2.0, vers=2.1, vers=3.11 } Probably next weekend again ... Thanks to lukameen for bringing this one up ! -- kjh p.s. I should report that `mount -t cifs` without vers= options is still working for the Win10 Box with SMBv1 Enabled ... I've not dug around yet in the logs to see what I can see but preliminary results are promising :) |
Well, hopefully this observation is relevant...
Today I tried to backup to a cifs-mount at work via rsync and had no luck. The process (on the -current kernel 4.14.55) hung and I got nasty errors in my dmesg; basically as reported here: Weird kernel error with CIFS / general protection fault. A workaround has been suggested here: bugs.archlinux.org/task/57474 where cifs option -vers=1.0 is proposed (instead of 3.0 or 2.1, which was the setting that worked before -- after reducing from 3.0 a while ago). With the setting vers=1.0 for mount.cifs the backup went well. So maybe it is not only/immediately a kernel-configuration issue but more how mount.cifs is called?? And thus dependent on the settings of the (windows)server one connects to....? hth rob |
Eeek !
Thanks for the heads-up brobr ! You probably saved my Saturday :) I built and installed 4.4.142 today including CONFIG_CIFS_SMB2 and CONFIG_CIFS_SMB311 and I was going to try almost exactly what you did ... mount the Win10 PeeCee Share and pull the Data back to the Linux BackUp Box from the mounted CIFS directory. I believe I'll put my scheduled testing off for a bit :) :) Thanks again. -- kjh |
Still, it doesn't look right, kjh. Was vers=1.0 not banned because of wannacry/petya vulnerabilities? Also, as 'duckgoing' just showed me, modern windows servers negotiate with the client what version to use:
Quote:
windows-server-2012-r2-which-version-of-the-smb-protocol-smb-1-0-smb-2-0-smb-2-1-smb-3-0-or-smb-3-02-are-you-using/ or here: whats-new-in-smb-3-1-1-in-the-windows-server-2016 So maybe something is going wrong at our client-side (as the most recent changes were the -current kernel-updates at my end; last samba-update was in May). It has also been submitted as a kernel bug here:cifs: generic/020 general protection fault Well, maybe your tests might be useful in the end. At the client-side you could vary the mount.cifs -o vers= to see whether your config changes allow negotiation of higher protocols without oopsing.. You might need to test with a big file though (mine were added up to over 10 Gb; which I was uploading with rsync to the windowes-share) rob |
1 Attachment(s)
Hi, I tested various dialect versions. At my work, from my slackware box with -current (4.14.55 or 56), no cifs-mount is possible with version 3 or over. With versions 2.0 or 2.1, or without any version given, mount works but rsync chokes immediately when trying to transfer files (So, not halfway or near the end). The general protection fault shows up in dmesg (see attached trace when trying with the 2.1 cifs-mount). After this, Thunar struggles and un-mounting the windows-share (as root) via umount needs the 'lazy' -l flag. Retrying another cifs-mount no longer works; a reboot is needed.
Hth rob |
Same issue here as well. Recently decided to look into ditching protocol version 1.0 due to potential issues and that MS wants to deprecate it anyway.
Using rsync to run backups from windows onto a slackware system. With shares mounted with vers=1.0, everything is fine. With 2.0, 2.1, or 3.0, a simple 'ls' fails to list an item or two, rsync misses items. Issue is the same on both 64-14.2 and 64-current (20180718). vers=3.11 not yet tested, mount.cifs fails with that option despite kernel having been recompiled to add that option. Figure I need to check documentation and maybe recompile cifs-utils. Maybe after my second cup of coffee this morning. |
Same here. Mounts fine, but the first write causes a segfault. Maybe something to do with these fixes. But I am too lazy to revert back to older kernel. Vers=1.0 works for now.
Cheers |
More information in case it's helpful, am using provided kernels on both 14.2 (4.4.132) and current (4.15.56). Server end is Win10-1803
Also, using shipped SlackBuild, upgraded cifs-tools on -current from 6.7 to 6.8, with vers=3.11 mount still fails with "Resource temporarily unavailable." Reverting to vers=1.0 for now. |
Thanks for the logs, brobr
Nice Laptop btw ... I am a Sager / Clevo man, myself :) -- kjh |
Thanks for the Info Gnisho and ivandi ...
I also wondered about util-linux after seeing the new on in today's Slackware 14.2+current :) -- kjh |
Quote:
|
Baby Steps ...
I've got a Windows 7 VMWare Machine running on my Work Laptop ( win7u ). All I use it for is Outlook and GoTo Meetings for Work. The Laptop is running 4.4.142 GENERIC including the following CIFS-related configs: Code:
# grep CIFS /boot/config Code:
# mount -v -t cifs //172.16.162.137/c /mnt/win7u -o "rw,uid=root,vers=2.1,forceuid,dir_mode=0777,file_mode=0666,noserverino,credentials=/root/.smbcred,ip=172.16.162.137" Code:
[ 3522.735657] FS-Cache: Loaded 1. copy the largest win7u file that I can find to /dev/null on the linux box as 'me'. NOTE: The test file is my Outlook .ost file so I closed Outlook on win7u because: 1) Outlook locks the file and 2) Outlook changes the file automatically as emails arrive. Code:
$ ls -la '/mnt/win7u//Users/konrad/AppData/local/Microsoft/Outlook/me@example.com.ost' Code:
$ cat '/mnt/win7u//Users/konrad/AppData/local/Microsoft/Outlook/me@example.com.ost' |dd bs=1M status=progress |gzip -c > foo-file.gz This is the original file: Code:
$ cat '/mnt/win7u//Users/konrad/AppData/local/Microsoft/Outlook/me@example.com.ost' |dd bs=1M status=progress |md5sum - Code:
Code:
$ rm foo-file.gz Code:
# umount /mnt/win7u Next up: write-to-Windows testing. -- kjh |
Hi Konrad. FYI, the CIFS section of the -current64 config-4.14.56:
Quote:
|
1 Attachment(s)
Interesting info brobr.
Kernel 4.14.56 CIFS Docs are below my sig ... as ( I believe it was ) 55020 said, there is no longer a CONFIG_CIFS_SMB2 Variable. I believe I read 'somewhere' that starting with 4.13.y that the default mount.cifs vers=2.0 ... So another 4.4.142 + ( CONFIG_CIFS_SMB2=y ; CONFIG_CIFS_SMB311=y ) experiment. I turned off SMB1 in Win7 ( see the attached picture for the Registry Key ). Here is a handy little test script to mount my win7u Windows 7 share with varying option vers= settings ( ! YMWV ! ) : Code:
#!/bin/sh Code:
# mount-win7u 1.0 ; r=$? ; [ "$r" = "0" ] && df /mnt/win7u && umount /mnt/win7u ; echo -e "\n# RetCode = $r" Code:
# mount-win7u 2.0 ; r=$? ; [ "$r" = "0" ] && df /mnt/win7u && umount /mnt/win7u ; echo -e "\n# RetCode = $r" Code:
# mount-win7u 2.1 ; r=$? ; [ "$r" = "0" ] && df /mnt/win7u && umount /mnt/win7u ; echo -e "\n# RetCode = $r" Code:
# mount-win7u 3.0 ; r=$? ; [ "$r" = "0" ] && df /mnt/win7u && umount /mnt/win7u ; echo -e "\n# RetCode = $r" -- kjh These are the 4.14.56 CIFS Kernel Configs Code:
config CIFS |
Possibly the server I am connecting to at work runs windows 7 and not 8 or 10 which would explain that I could mount with cifs using dialect versions 2.0, 2.1 but not higher...
|
All times are GMT -5. The time now is 09:11 PM. |