All of lore.kernel.org
 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/2] Remove rfc1002 headers from SMB2 responses
Date: Wed,  3 Jan 2018 09:35:22 +1100	[thread overview]
Message-ID: <20180102223524.8389-1-lsahlber@redhat.com> (raw)

Steve, all

Please review but do not merge.
This is based on current sfrench/for-next and is the final step
before we can start doing compounding.

The patch will break the soon to be merged SMBD support from Long Li
so do not merge this. I suggest we wait until Long's patches are merged and
I will rebase, and fixup the SMBD parts that this breaks.

The first patch removes the rfc1002 length field from all SMB2 responses.
Unfortunately it is not easy to do this in a set of incremental patches
as opposed to one single big patch since in the demultiplex loop
we can not really distinguish between different response structures
until we have read the full SMB2 header, and in order to read the header
we must know whether there should be a rfc1002 length there or not.
I.e. chicken and egg.

During developmnet of these patches I did have a series that performed
the change one structure at a time but it is very ugly, doing 
memcpy to strip off the header when there should be none
and converting several helper functions to check their char*buf arguments
whether it looked like the buffer started with a rfc1002 header or not.
Very ugly and not I think something we want in the upstream commit history
but if someone really wants to see the "individual change for each response
structure" I could make those intermediate patchsets available.

It works for basic and manual testing. What remains is to ensure that
SMBD is updated to not have to prepend the length field any more
once those patches go in, and also SMB3 encryption.
I have not had a chance to test it so if someone could help here
would be awesome.


The second patch updates the demultiplex loop so that it can handle
compounded responses.

             reply	other threads:[~2018-01-02 22:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-02 22:35 Ronnie Sahlberg [this message]
     [not found] ` <20180102223524.8389-1-lsahlber-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2018-01-02 22:35   ` [PATCH 1/2] cifs: remove rfc1002 header from all SMB2 response structures Ronnie Sahlberg
     [not found]     ` <20180102223524.8389-2-lsahlber-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2018-01-03 18:26       ` Tom Talpey
2018-01-11  2:41       ` Long Li
2018-01-02 22:35   ` [PATCH 2/2] cifs: update multiplex loop to handle compounded responses Ronnie Sahlberg
2018-01-02 22:43   ` [PATCH 0/2] Remove rfc1002 headers from SMB2 responses ronnie sahlberg

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=20180102223524.8389-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 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.