Fwd: cifs.ko v2.1 bug (kernel 4.15)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---------- Forwarded message ----------
From: Steve French <smfrench@xxxxxxxxx>
Date: Wed, May 16, 2018 at 2:47 PM
Subject: Re: cifs.ko v2.1 bug (kernel 4.15)
To: Chad William Seys <cwseys@xxxxxxxxxxxxxxxx>
Cc: linux-cifs@xxxxxxxxxxxxxxxx


The SMB3 POSIX extensions will address this - but in the short term
(before the extensions are merged) it is a tricky
problem as it is legal to have two files (or directory) with the same
name which differ in case (case preserving) in Windows, Macs SMB3 etc.
- but ... case sensitivity is not advertised or requestable in SMB3
(without the protocol extensions mentioned above).  From cifs
("vers=1.0" dialect it was possible to request POSIX extensions which
Samba supports.

We may be able to do this with AAPL context in SMB3 (while waiting for
the testing on the SMB3 POSIX extensions ...) though and for the
special case you describe (directory vs. file name conflict when case
insensitive) we may be able to work around this.


On Wed, May 16, 2018 at 2:07 PM, Chad William Seys
<cwseys@xxxxxxxxxxxxxxxx> wrote:
>
>
>
> -------- Forwarded Message --------
> Subject: cifs.ko v2.1 bug (kernel 4.15)
> Date: Mon, 7 May 2018 10:40:29 -0500
> From: Chad William Seys <cwseys@xxxxxxxxxxxxxxxx>
> To: samba@xxxxxxxxxxxxxxx
>
> Hi all,
>    I have observed in kernel 4.15 cifs.ko using protocol v2.1 getting
> confused about whether a "filesystem object" is a file or a directory.
>    The true state in the example below is that "Alien" is directory and
> "alien" is a (perl) file.
>    However, 'file' reports the type to be the same and matching the first
> object accessed, e.g.
>
> Both are perl scripts (dmesg and pcap log linked):
> root@tardis01:/# mount /smbbackupdir/smb01
> root@tardis01:/# file /smbbackupdir/smb01/home/eleonard/utils/alien/alien
> /smbbackupdir/smb01/home/eleonard/utils/alien/alien: Perl script text
> executable
> root@tardis01:/# file /smbbackupdir/smb01/home/eleonard/utils/alien/Alien
> /smbbackupdir/smb01/home/eleonard/utils/alien/Alien: Perl script text
> executable
>
> Both are directories:
> root@tardis01:/# mount /smbbackupdir/smb01
> root@tardis01:/# file /smbbackupdir/smb01/home/eleonard/utils/alien/Alien
> /smbbackupdir/smb01/home/eleonard/utils/alien/Alien: directory
> root@tardis01:/# file /smbbackupdir/smb01/home/eleonard/utils/alien/alien
> /smbbackupdir/smb01/home/eleonard/utils/alien/alien: directory
>
> Strangely, copying to a different directory makes this non-reproducible:
> root@tardis01:/# mount /smbbackupdir/smb01
> root@tardis01:/# file /smbbackupdir/smb01/home/cwseys/utils/alien/Alien/
> /smbbackupdir/smb01/home/cwseys/utils/alien/Alien/: directory
> root@tardis01:/# file /smbbackupdir/smb01/home/cwseys/utils/alien/alien
> /smbbackupdir/smb01/home/cwseys/utils/alien/alien: writable, executable,
> regular file, no read permission
>
> Using protocol v1.0 makes problem go away (dmesg and pcap log linked)
> root@tardis01:/# mount /smbbackupdir/smb01
> root@tardis01:/# file /smbbackupdir/smb01/home/eleonard/utils/alien/Alien/
> /smbbackupdir/smb01/home/eleonard/utils/alien/Alien/: directory
> root@tardis01:/# file /smbbackupdir/smb01/home/eleonard/utils/alien/alien
> /smbbackupdir/smb01/home/eleonard/utils/alien/alien: Perl script text
> executable
>
> The fstab line (vers=1.0, switch to vers=2.1 as needed):
> //smb01.physics.wisc.edu/smb    /smbbackupdir/smb01     cifs
> vers=1.0,sec=krb5,multiuser,username=backupadmin@xxxxxxxxxxxxxxxx      0
> 0
>
> I've linked 4 files to this email:
> * trace_v1.log (763 bytes) hosted on Box:
> https://uwmadison.box.com/s/u1acmjy7479id3oyqwkckanyjwbuvnlz
> * trace_v1.pcap (1.2 MB) hosted on Box:
> https://uwmadison.box.com/s/f0z1daqz9acsen24fgkwmrrih9cd242u
> * trace_v2.1.pcap (76.9 MB) hosted on Box:
> https://uwmadison.box.com/s/ppw29iviqn26vbvspfta9ol1whqsvz5j
> * trace_v2.1.log (763 bytes) hosted on Box:
> https://uwmadison.box.com/s/1ctdf3ep9nsgv3n3gsmsdtnttv1sir6o
>
> This is on Debian Stretch with backported kernel version 4.15+91~bpo9+1 .
> Let me know if I can provide any more info,
> Chad.
>
>
>
>



--
Thanks,

Steve


-- 
Thanks,

Steve
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux