~cascardo/ubuntu/+source/linux/+git/xenial:cifs

Last commit made on 2017-06-21
Get this branch:
git clone -b cifs https://git.launchpad.net/~cascardo/ubuntu/+source/linux/+git/xenial
Only Thadeu Lima de Souza Cascardo can upload to this branch. If you are Thadeu Lima de Souza Cascardo please log in for upload directions.

Branch merges

Branch information

Recent commits

1b65e2a... by Sachin Prabhu <email address hidden>

Handle mismatched open calls

BugLink: http://bugs.launchpad.net/bugs/1670508

A signal can interrupt a SendReceive call which result in incoming
responses to the call being ignored. This is a problem for calls such as
open which results in the successful response being ignored. This
results in an open file resource on the server.

The patch looks into responses which were cancelled after being sent and
in case of successful open closes the open fids.

For this patch, the check is only done in SendReceive2()

RH-bz: 1403319

Signed-off-by: Sachin Prabhu <email address hidden>
Reviewed-by: Pavel Shilovsky <email address hidden>
Cc: Stable <email address hidden>
(cherry-picked from commit 38bd49064a1ecb67baad33598e3d824448ab11ec)
Signed-off-by: Thadeu Lima de Souza Cascardo <email address hidden>

Signed-off-by: Thadeu Lima de Souza Cascardo <email address hidden>

8c98c5d... by Sachin Prabhu <email address hidden>

Call echo service immediately after socket reconnect

BugLink: http://bugs.launchpad.net/bugs/1670508

Commit 4fcd1813e640 ("Fix reconnect to not defer smb3 session reconnect
long after socket reconnect") changes the behaviour of the SMB2 echo
service and causes it to renegotiate after a socket reconnect. However
under default settings, the echo service could take up to 120 seconds to
be scheduled.

The patch forces the echo service to be called immediately resulting a
negotiate call being made immediately on reconnect.

Signed-off-by: Sachin Prabhu <email address hidden>
Reviewed-by: Pavel Shilovsky <email address hidden>
Signed-off-by: Steve French <email address hidden>
(cherry picked from commit b8c600120fc87d53642476f48c8055b38d6e14c7)
Signed-off-by: Thadeu Lima de Souza Cascardo <email address hidden>

5b88306... by Pavel Shilovsky

CIFS: Fix possible use after free in demultiplex thread

BugLink: http://bugs.launchpad.net/bugs/1670508

The recent changes that added SMB3 encryption support introduced
a possible use after free in the demultiplex thread. When we
process an encrypted packed we obtain a pointer to SMB session
but do not obtain a reference. This can possibly lead to a situation
when this session was freed before we copy a decryption key from
there. Fix this by obtaining a copy of the key rather than a pointer
to the session under a spinlock.

Signed-off-by: Pavel Shilovsky <email address hidden>
Signed-off-by: Steve French <email address hidden>
(cherry picked from commit 61cfac6f267dabcf2740a7ec8a0295833b28b5f5)
Signed-off-by: Joseph Salisbury <email address hidden>

710abea... by Pavel Shilovsky

CIFS: Allow to switch on encryption with seal mount option

BugLink: http://bugs.launchpad.net/bugs/1670508

This allows users to inforce encryption for SMB3 shares if a server
supports it.

Signed-off-by: Pavel Shilovsky <email address hidden>
(backport from commit ae6f8dd4d0c87bfb72da9d9b56342adf53e69c31)
Signed-off-by: Joseph Salisbury <email address hidden>
[cascardo: fixup of conflict with 06e7bc1427cfb2fe4d2ac84305afb79dbb0b42f3]
Signed-off-by: Thadeu Lima de Souza Cascardo <email address hidden>

ee43d19... by Pavel Shilovsky

CIFS: Add capability to decrypt big read responses

BugLink: http://bugs.launchpad.net/bugs/1670508

Allow to decrypt transformed packets that are bigger than the big
buffer size. In particular it is used for read responses that can
only exceed the big buffer size.

Signed-off-by: Pavel Shilovsky <email address hidden>
(cherry picked from commit c42a6abe3012832a68a371dabe17c2ced97e62ad)
Signed-off-by: Joseph Salisbury <email address hidden>

06e5b5d... by Pavel Shilovsky

CIFS: Decrypt and process small encrypted packets

BugLink: http://bugs.launchpad.net/bugs/1670508

Allow to decrypt transformed packets, find a corresponding mid
and process as usual further.

Signed-off-by: Pavel Shilovsky <email address hidden>
(cherry picked from commit 4326ed2f6a16ae9d33e4209b540dc9a371aba840)
Signed-off-by: Joseph Salisbury <email address hidden>

b6379f0... by Pavel Shilovsky

CIFS: Add copy into pages callback for a read operation

BugLink: http://bugs.launchpad.net/bugs/1670508

Since we have two different types of reads (pagecache and direct)
we need to process such responses differently after decryption of
a packet. The change allows to specify a callback that copies a read
payload data into preallocated pages.

Signed-off-by: Pavel Shilovsky <email address hidden>
(cherry picked from commit d70b9104b1ca586f73aaf59426756cec3325a40e)
Signed-off-by: Joseph Salisbury <email address hidden>

2775dda... by Pavel Shilovsky

CIFS: Add mid handle callback

BugLink: http://bugs.launchpad.net/bugs/1670508

We need to process read responses differently because the data
should go directly into preallocated pages. This can be done
by specifying a mid handle callback.

Signed-off-by: Pavel Shilovsky <email address hidden>
(cherry picked from commit 9b7c18a2d4b798963ea80f6769701dcc4c24b55e)
Signed-off-by: Joseph Salisbury <email address hidden>

6fb6630... by Pavel Shilovsky

CIFS: Add transform header handling callbacks

BugLink: http://bugs.launchpad.net/bugs/1670508

We need to recognize and parse transformed packets in demultiplex
thread to find a corresponsing mid and process it further.

Signed-off-by: Pavel Shilovsky <email address hidden>
(cherry picked from commit 9bb17e0916a03ab901fb684e874d77a1e96b3d1e)
Signed-off-by: Joseph Salisbury <email address hidden>

b0aafa1... by Pavel Shilovsky

CIFS: Encrypt SMB3 requests before sending

BugLink: http://bugs.launchpad.net/bugs/1670508

This change allows to encrypt packets if it is required by a server
for SMB sessions or tree connections.

Signed-off-by: Pavel Shilovsky <email address hidden>
(backported from commit 026e93dc0a3eefb0be060bcb9ecd8d7a7fd5c398)
Signed-off-by: Joseph Salisbury <email address hidden>