Linux CIFS filesystem development
 help / color / mirror / Atom feed
From: Ronnie Sahlberg <lsahlber-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: linux-cifs <linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Cc: Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: [PATCH 0/1] Remove the rfc1002 length from all SMB2 requests
Date: Wed,  1 Nov 2017 12:51:43 +1100	[thread overview]
Message-ID: <20171101015144.2034-1-lsahlber@redhat.com> (raw)

Steve, All,

Do not merge yet. It is still WIP but I want some review.

I have been looking at compounding, but before we can do that easily
we need to break the layering violation that happens between the
RFC1002 SM Length field and the SMB2 PDUs.

This patch removes the 4 byte RFC1002 length header from all SMB2 request
structures and at the same time also gets rid of a lot of the
magic +4 / -4 tweaking that was used all over the code to cope with that
the structures were actually bigger than they should be. It also
gets rid of a lot of magic "tweak the first four bytes" as the dynamic
parts of the SMB2 pdus are constructed.

Additionally we have a new SendReceive3() function that computes and attaches
the rfc1002 length from scratch, based on the input kiov containing the
smb2 pdu and data.


This will simplify later for compounding when we will use the SMB2_*()
functions to create multiple SMB2 pdus that will all be wrapped inside
one single rfc1002 header.


It would be nice to do the similar split of the nbss and smb2 layers
for all the reply structures as well but that can go in a different patch.

             reply	other threads:[~2017-11-01  1:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-01  1:51 Ronnie Sahlberg [this message]
     [not found] ` <20171101015144.2034-1-lsahlber-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2017-11-01  1:51   ` [PATCH] cifs: Remove the rfc1002 header from SMB2 request structures Ronnie Sahlberg
2017-11-02 10:05   ` [PATCH 0/1] Remove the rfc1002 length from all SMB2 requests Aurélien Aptel
     [not found]     ` <87shdxuhbg.fsf-IBi9RG/b67k@public.gmane.org>
2017-11-02 10:31       ` ronnie sahlberg
     [not found]         ` <CAN05THRMgZwUfgpXQudSzmH-8tOriv+dZnGPAK2u9h+4bmU2Mw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-11-02 21:53           ` Tom Talpey

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=20171101015144.2034-1-lsahlber@redhat.com \
    --to=lsahlber-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=smfrench-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox