From: Tim Gardner <timg-l6nL5VImRDY@public.gmane.org>
To: Shirish Pargaonkar
<shirishpargaonkar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: linux-cifs <linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
samba-technical
<samba-technical-w/Ol4Ecudpl8XjKLYN78aQ@public.gmane.org>,
LKML <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Steve French <sfrench-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>
Subject: Re: [PATCH 2/2 linux-next] cifs: Make big endian multiplex ID sequences monotonic on the wire
Date: Wed, 16 Oct 2013 09:39:26 -0700 [thread overview]
Message-ID: <525EC13E.1080304@tpi.com> (raw)
In-Reply-To: <CADT32e+hGPe5WpNk-Bh-GVotQM2+-J458D1GNaRp55s3vcQWSw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On 10/16/2013 09:25 AM, Shirish Pargaonkar wrote:
> On Wed, Oct 16, 2013 at 10:09 AM, Tim Gardner <timg-l6nL5VImRDY@public.gmane.org> wrote:
>> The multiplex identifier (MID) in the SMB header is only
>> ever used by the client, in conjunction with PID, to match responses
>> from the server. As such, the endianess of the MID is not important.
>> However, When tracing packet sequences on the wire, protocol analyzers
>> such as wireshark display MID as little endian. It is much more informative
>> for the on-the-wire MID sequences to match debug information emitted by the
>> CIFS driver. Therefore, one should write and read MID in the SMB header
>> assuming it is always little endian.
>>
>> Observed from wireshark during the protocol negotiation
>> and session setup:
>>
>> Multiplex ID: 256
>> Multiplex ID: 256
>> Multiplex ID: 512
>> Multiplex ID: 512
>> Multiplex ID: 768
>> Multiplex ID: 768
>>
>> After this patch on-the-wire MID values begin at 1 and increase monotonically.
>>
>> Introduce get_next_mid64() for the internal consumers that use the full 64 bit
>> multiplex identifier.
>>
>> Introduce the helpers get_mid() and compare_mid() to make the endian
>> translation clear.
>>
>> Cc: Steve French <sfrench-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>
>> Signed-off-by: Tim Gardner <timg-l6nL5VImRDY@public.gmane.org>
>> ---
>>
>> I'm looking at some of this code in excrutiating detail because I'm having trouble
>> with a backport of CIFS from 3.9.7 on an embedded 2.6.31 powerpc. Its failing the RawNTLMSSP
>> authentication and is almost certainly an endian issue. x86 on the same code base works
>> quite well. Am I making a rash assumption that CIFS in 3.9 stable worked on big endian ?
>
> Do you have this commit fdf96a907c1fbb93c633e2b7ede3b8df26d6a4c0 ?
> This might help if you do not have it in your code base.
>
Yep - I found that one pretty early on. It solved a powerpc issue with
session startup to an x86 Linux CIFS server. The current failing session
startup is to an Apple 10.8.5 (Lion) server (serverNOS=@(#)PROGRAM:smbd
PROJECT:smbx-136.20.1).
rtg
--
Tim Gardner timg-l6nL5VImRDY@public.gmane.org www.tpi.com
OR 503-601-0234 x102 MT 406-443-5357
WARNING: multiple messages have this Message-ID (diff)
From: Tim Gardner <timg@tpi.com>
To: Shirish Pargaonkar <shirishpargaonkar@gmail.com>
Cc: linux-cifs <linux-cifs@vger.kernel.org>,
samba-technical <samba-technical@lists.samba.org>,
LKML <linux-kernel@vger.kernel.org>,
Steve French <sfrench@samba.org>
Subject: Re: [PATCH 2/2 linux-next] cifs: Make big endian multiplex ID sequences monotonic on the wire
Date: Wed, 16 Oct 2013 09:39:26 -0700 [thread overview]
Message-ID: <525EC13E.1080304@tpi.com> (raw)
In-Reply-To: <CADT32e+hGPe5WpNk-Bh-GVotQM2+-J458D1GNaRp55s3vcQWSw@mail.gmail.com>
On 10/16/2013 09:25 AM, Shirish Pargaonkar wrote:
> On Wed, Oct 16, 2013 at 10:09 AM, Tim Gardner <timg@tpi.com> wrote:
>> The multiplex identifier (MID) in the SMB header is only
>> ever used by the client, in conjunction with PID, to match responses
>> from the server. As such, the endianess of the MID is not important.
>> However, When tracing packet sequences on the wire, protocol analyzers
>> such as wireshark display MID as little endian. It is much more informative
>> for the on-the-wire MID sequences to match debug information emitted by the
>> CIFS driver. Therefore, one should write and read MID in the SMB header
>> assuming it is always little endian.
>>
>> Observed from wireshark during the protocol negotiation
>> and session setup:
>>
>> Multiplex ID: 256
>> Multiplex ID: 256
>> Multiplex ID: 512
>> Multiplex ID: 512
>> Multiplex ID: 768
>> Multiplex ID: 768
>>
>> After this patch on-the-wire MID values begin at 1 and increase monotonically.
>>
>> Introduce get_next_mid64() for the internal consumers that use the full 64 bit
>> multiplex identifier.
>>
>> Introduce the helpers get_mid() and compare_mid() to make the endian
>> translation clear.
>>
>> Cc: Steve French <sfrench@samba.org>
>> Signed-off-by: Tim Gardner <timg@tpi.com>
>> ---
>>
>> I'm looking at some of this code in excrutiating detail because I'm having trouble
>> with a backport of CIFS from 3.9.7 on an embedded 2.6.31 powerpc. Its failing the RawNTLMSSP
>> authentication and is almost certainly an endian issue. x86 on the same code base works
>> quite well. Am I making a rash assumption that CIFS in 3.9 stable worked on big endian ?
>
> Do you have this commit fdf96a907c1fbb93c633e2b7ede3b8df26d6a4c0 ?
> This might help if you do not have it in your code base.
>
Yep - I found that one pretty early on. It solved a powerpc issue with
session startup to an x86 Linux CIFS server. The current failing session
startup is to an Apple 10.8.5 (Lion) server (serverNOS=@(#)PROGRAM:smbd
PROJECT:smbx-136.20.1).
rtg
--
Tim Gardner timg@tpi.com www.tpi.com
OR 503-601-0234 x102 MT 406-443-5357
next prev parent reply other threads:[~2013-10-16 16:39 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-16 15:09 [PATCH 1/2 linux-next] cifs: Remove redundant multiplex identifier check from check_smb_hdr() Tim Gardner
2013-10-16 15:09 ` Tim Gardner
2013-10-16 15:09 ` [PATCH 2/2 linux-next] cifs: Make big endian multiplex ID sequences monotonic on the wire Tim Gardner
2013-10-16 15:40 ` Jeff Layton
2013-10-16 15:40 ` Jeff Layton
[not found] ` <20131016114007.3b7d4fc6-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2013-10-16 16:02 ` Tim Gardner
2013-10-16 16:02 ` Tim Gardner
[not found] ` <1381936190-67628-2-git-send-email-timg-l6nL5VImRDY@public.gmane.org>
2013-10-16 16:25 ` Shirish Pargaonkar
2013-10-16 16:25 ` Shirish Pargaonkar
[not found] ` <CADT32e+hGPe5WpNk-Bh-GVotQM2+-J458D1GNaRp55s3vcQWSw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-10-16 16:39 ` Tim Gardner [this message]
2013-10-16 16:39 ` Tim Gardner
[not found] ` <1381936190-67628-1-git-send-email-timg-l6nL5VImRDY@public.gmane.org>
2013-10-16 15:36 ` [PATCH 1/2 linux-next] cifs: Remove redundant multiplex identifier check from check_smb_hdr() Jeff Layton
2013-10-16 15:36 ` Jeff Layton
[not found] ` <20131016113632.6548d399-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2013-10-28 14:37 ` Steve French
2013-10-28 14:37 ` Steve French
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=525EC13E.1080304@tpi.com \
--to=timg-l6nl5vimrdy@public.gmane.org \
--cc=linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=samba-technical-w/Ol4Ecudpl8XjKLYN78aQ@public.gmane.org \
--cc=sfrench-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org \
--cc=shirishpargaonkar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.