From patchwork Thu Nov 23 00:38:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Long Li X-Patchwork-Id: 840623 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-cifs-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3yj0sR23Tjz9s83 for ; Thu, 23 Nov 2017 11:42:35 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752124AbdKWAlv (ORCPT ); Wed, 22 Nov 2017 19:41:51 -0500 Received: from a2nlsmtp01-04.prod.iad2.secureserver.net ([198.71.225.38]:39122 "EHLO a2nlsmtp01-04.prod.iad2.secureserver.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752849AbdKWAkR (ORCPT ); Wed, 22 Nov 2017 19:40:17 -0500 Received: from linuxonhyperv.com ([107.180.71.197]) by : HOSTING RELAY : with SMTP id HfXce4a2wgsKFHfXceQX1l; Wed, 22 Nov 2017 17:39:15 -0700 x-originating-ip: 107.180.71.197 Received: from longli by linuxonhyperv.com with local (Exim 4.89) (envelope-from ) id 1eHfXc-0004UD-KM; Wed, 22 Nov 2017 17:38:56 -0700 From: Long Li To: Steve French , linux-cifs@vger.kernel.org, samba-technical@lists.samba.org, linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org, Christoph Hellwig , Tom Talpey , Matthew Wilcox , Stephen Hemminger Cc: Long Li Subject: [Patch v8 16/16] CIFS: SMBD: Disable signing on SMB direct transport Date: Wed, 22 Nov 2017 17:38:49 -0700 Message-Id: <20171123003849.17093-17-longli@exchange.microsoft.com> X-Mailer: git-send-email 2.15.0 In-Reply-To: <20171123003849.17093-1-longli@exchange.microsoft.com> References: <20171123003849.17093-1-longli@exchange.microsoft.com> X-CMAE-Envelope: MS4wfLZE5Hgd7LBwlGsnXH1R46MrLS+7X/A49Nns2oU7LygdrEmyWSdw9LNjZ8e5YHSVWKrX3KU++b7iedVecyflRlAkKeaWAfQvch0VF8i7YDms7RjiJ3O0 A5RmPXbwRKbIC0qLVLZ7aRFFiaURH42XLM7My1Hb+jDlHnZQZkvewujxg3+uf2gSIkQ6CF5KkZGzN/bz6kHFvaixoxI7LhWltIc979TLuJCywzfXhKIRxbsG DsK7VAqNYSC1M16LBEdKe0QyLLnpIVf28Zh9/iWtRsdal23Tz8b1bgirwN4K+U783l/hWaKw4zXfxRqtNiAEKgsK9rFCbG9dwHDyjJM0ooGgMaIuf1Qb8DL6 AhV48C/aAHuENHfCtCYWgcfJxWf7ECfM0PDZapchUwnrkpX+ns7+kAtuq01j6nMLt1SDX1McUrqtLrQGmkFmXfak/t4lE0gcghKMEKiW6cxUEDvuv/6+am4C 1c5IOOlKNVl31X74hGRrOfWst2PaylicVU1tKg== Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org From: Long Li 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 --- fs/cifs/connect.c | 8 ++++++++ fs/cifs/smb2pdu.c | 5 +++++ 2 files changed, 13 insertions(+) diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 1677401..b18eae1 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -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) { diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c index bee0871d..a3e67be 100644 --- a/fs/cifs/smb2pdu.c +++ b/fs/cifs/smb2pdu.c @@ -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