From patchwork Tue Aug 28 21:53:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve French X-Patchwork-Id: 10579211 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AA90114E1 for ; Tue, 28 Aug 2018 21:53:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A164B2AB27 for ; Tue, 28 Aug 2018 21:53:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 95BB22AD15; Tue, 28 Aug 2018 21:53:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 474732AB32 for ; Tue, 28 Aug 2018 21:53:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727221AbeH2BrZ (ORCPT ); Tue, 28 Aug 2018 21:47:25 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:37973 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727216AbeH2BrZ (ORCPT ); Tue, 28 Aug 2018 21:47:25 -0400 Received: by mail-pl1-f196.google.com with SMTP id u11-v6so1313759plq.5 for ; Tue, 28 Aug 2018 14:53:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=7cZqGGAS4oXHnVYXgjWpWHwoKcq550XQgucxpcCjGhw=; b=pjjwphBOujDQXtlnQPRRr+LREiu5hcwLWolQWqJWtTYVWGMXEir/kuUyHKr8k0cCae gyWy0V7ORhuBuIQU6MucY4itt9SsI/dwUdXVMQSo+PXCQAHPfaEZwVv6Afdi2y3OvP2S KSuNrh8MeCzH/WQzpcK7i41CRpB9fLnbZw9S1DmImGzgaW7dK+yBeg+cib8c1f3YadqZ QVcGbaEHhLSDidILJKZNSxEDuoCIONENNF3BEM6pe2+k25t6tqB3c5BkdIM+A6A+KRvF MBgGp6t1VHt8TIxs/0L/cemA4QVa2Et9HPvaIsvEfAjQGPEkrcqsMGTg/nmWdCPkEWyA O8kg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=7cZqGGAS4oXHnVYXgjWpWHwoKcq550XQgucxpcCjGhw=; b=H3HVyjzi9znuzSYNDBcmnLGN+uikPVGNz7j/nri0sJBE0sPplDttctoJkQfi+QJRpc GnUC6nlpBkobeIT09tgdKidcGcSW3prNKgl9/pJCQ36Mr1rmJ5hfro+xijFWlyQ/kAlN jqUrcu39Zx5kBNMdmV4lSQaUtrWSYcPa5kjnG4h0x4H7zns6d4nHxH5SGouFFnZxsKFi syay8CombWADiJuxBm2I3OCEE3Wjko7JS1eM1kuBsvOa8j64BEnZo4vxHfwvDWrdV2A7 tDfwMehC9k0nzQnPA/Ml7CDdcjLRUn05puhCPLPti38Dh7lm/JqUBnrzsoG3phkeDXPe kT9A== X-Gm-Message-State: APzg51AIBZKi/Go/gkvYQlTnFRCw2BAoRJFu35KRboB9HOLoIcrmv3Lr oLJDWzCUlYxzJw0gHHTWZjD3xuGM/6OBHd043WELyqn7 X-Google-Smtp-Source: ANB0VdYDWjIsgv/Qvs2EBoR6uF/NDW61ZTjf9UkFUhd9ULprixoPhaPhZDwEp4ExE61mLZJ6VEaUgaaPeVY8JGVT6bs= X-Received: by 2002:a17:902:27a8:: with SMTP id d37-v6mr3237895plb.290.1535493227561; Tue, 28 Aug 2018 14:53:47 -0700 (PDT) MIME-Version: 1.0 From: Steve French Date: Tue, 28 Aug 2018 16:53:36 -0500 Message-ID: Subject: [PATCH] smb3: minor debugging clarifications in rfc1001 len processing To: CIFS Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP I ran into some cases where the server was returning the wrong length on frames but I couldn't easily match them to the command in the network trace (or server logs) since I need the command and/or multiplex id to find the offending SMB2/SMB3 command. Add these two fields to the log message. Signed-off-by: Steve French Reviewed-by: Ronnie Sahlberg --- fs/cifs/smb2misc.c | 7 +++++-- fs/cifs/smb2ops.c | 4 ++++ 3 files changed, 10 insertions(+), 2 deletions(-) } diff --git a/fs/cifs/smb2misc.c b/fs/cifs/smb2misc.c index db0453660ff6..9171720dc658 100644 --- a/fs/cifs/smb2misc.c +++ b/fs/cifs/smb2misc.c @@ -254,10 +254,13 @@ smb2_check_message(char *buf, unsigned int len, struct TCP_Server_Info *srvr) */ if (clc_len < len) { printk_once(KERN_WARNING - "SMB2 server sent bad RFC1001 len %d not %d\n", - len, clc_len); + "srv rsp too long %d not %d for cmd:%d mid:%llu\n", + len, clc_len, command, mid); return 0; } + printk_once(KERN_WARNING + "srv rsp too short, len %d not %d. cmd:%d mid:%llu\n", + len, clc_len, command, mid); return 1;