CIFS: SMBD: Disable signing on SMB direct transport
authorLong Li <longli@microsoft.com>
Thu, 23 Nov 2017 00:38:49 +0000 (17:38 -0700)
committerSteve French <smfrench@gmail.com>
Thu, 25 Jan 2018 01:49:07 +0000 (19:49 -0600)
Currently the CIFS SMB Direct implementation (experimental) doesn't properly
support signing. Disable it when SMB Direct is in use for transport.

Signing will be enabled in future after it is implemented.

Signed-off-by: Long Li <longli@microsoft.com>
Signed-off-by: Steve French <smfrench@gmail.com>
Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com>
Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com>
fs/cifs/connect.c
fs/cifs/smb2pdu.c

index 1677401660d00517e9d025f2004154b6966bf8bd..0efd22e75ac7003b8c700437a3d7b60de991bdc8 100644 (file)
@@ -1968,6 +1968,14 @@ cifs_parse_mount_options(const char *mountdata, const char *devname,
                goto cifs_parse_mount_err;
        }
 
+#ifdef CONFIG_CIFS_SMB_DIRECT
+       if (vol->rdma && vol->sign) {
+               cifs_dbg(VFS, "Currently SMB direct doesn't support signing."
+                       " This is being fixed\n");
+               goto cifs_parse_mount_err;
+       }
+#endif
+
 #ifndef CONFIG_KEYS
        /* Muliuser mounts require CONFIG_KEYS support */
        if (vol->multiuser) {
index bee0871d6ddafba07909a4e7c87c2d80b6120d86..a3e67beb73e24e31609c6820b88f6660a2120c08 100644 (file)
@@ -616,6 +616,11 @@ int smb3_validate_negotiate(const unsigned int xid, struct cifs_tcon *tcon)
 
        cifs_dbg(FYI, "validate negotiate\n");
 
+#ifdef CONFIG_CIFS_SMB_DIRECT
+       if (tcon->ses->server->rdma)
+               return 0;
+#endif
+
        /*
         * validation ioctl must be signed, so no point sending this if we
         * can not sign it (ie are not known user).  Even if signing is not