<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/fs/smbfs_common, branch master</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=master</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2023-05-24T21:29:21Z</updated>
<entry>
<title>smb: move client and server files to common directory fs/smb</title>
<updated>2023-05-24T21:29:21Z</updated>
<author>
<name>Steve French</name>
<email>stfrench@microsoft.com</email>
</author>
<published>2023-05-22T01:46:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=38c8a9a52082579090e34c033d439ed2cd1a462d'/>
<id>urn:sha1:38c8a9a52082579090e34c033d439ed2cd1a462d</id>
<content type='text'>
Move CIFS/SMB3 related client and server files (cifs.ko and ksmbd.ko
and helper modules) to new fs/smb subdirectory:

   fs/cifs --&gt; fs/smb/client
   fs/ksmbd --&gt; fs/smb/server
   fs/smbfs_common --&gt; fs/smb/common

Suggested-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Acked-by: Namjae Jeon &lt;linkinjeon@kernel.org&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>SMB3.1.1: correct definition for app_instance_id create contexts</title>
<updated>2023-05-02T14:23:23Z</updated>
<author>
<name>Steve French</name>
<email>stfrench@microsoft.com</email>
</author>
<published>2023-04-30T17:27:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3d6b15a8f3aeb4a6eed69a22822def0d0b039a16'/>
<id>urn:sha1:3d6b15a8f3aeb4a6eed69a22822def0d0b039a16</id>
<content type='text'>
The name lengths were incorrect for two create contexts.
     SMB2_CREATE_APP_INSTANCE_ID
     SMB2_CREATE_APP_INSTANCE_VERSION

Update the definitions for these two to match the protocol specs.

Acked-by: Paulo Alcantara (SUSE) &lt;pc@manguebit.com&gt;
Reviewed-by: Namjae Jeon &lt;linkinjeon@kernel.org&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>smb3: move some common open context structs to smbfs_common</title>
<updated>2023-04-29T03:50:32Z</updated>
<author>
<name>Steve French</name>
<email>stfrench@microsoft.com</email>
</author>
<published>2023-04-28T05:41:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2fe187dca6030dd5dbecfe38e9610544d46e8c02'/>
<id>urn:sha1:2fe187dca6030dd5dbecfe38e9610544d46e8c02</id>
<content type='text'>
create durable and create durable reconnect context and the maximal
access create context struct definitions can be put in common code in
smbfs_common

Reviewed-by: Paulo Alcantara (SUSE) &lt;pc@manguebit.com&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>smb3: make query_on_disk_id open context consistent and move to common code</title>
<updated>2023-04-29T03:50:16Z</updated>
<author>
<name>Steve French</name>
<email>stfrench@microsoft.com</email>
</author>
<published>2023-04-28T05:21:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1149c8467ddebfb6bb9aab37830f70a49cab7085'/>
<id>urn:sha1:1149c8467ddebfb6bb9aab37830f70a49cab7085</id>
<content type='text'>
cifs and ksmbd were using a slightly different version of the query_on_disk_id
struct which could be confusing. Use the ksmbd version of this struct, and
move it to common code.

Reviewed-by: Paulo Alcantara (SUSE) &lt;pc@manguebit.com&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>SMB3.1.1: add new tree connect ShareFlags</title>
<updated>2023-04-29T02:24:52Z</updated>
<author>
<name>Steve French</name>
<email>stfrench@microsoft.com</email>
</author>
<published>2023-04-27T17:45:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c09ba02cfaf35732f7e36f291dd9679a6f109a12'/>
<id>urn:sha1:c09ba02cfaf35732f7e36f291dd9679a6f109a12</id>
<content type='text'>
Also update these flag names in a few places to match the simpler
easier to understand names now used in the protocol documentation
(see MS-SMB2 section 2.2.10)

Acked-by: Bharath SM &lt;bharathsm@microsoft.com&gt;
Reviewed-by: Paulo Alcantara (SUSE) &lt;pc@manguebit.com&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>smb3: Replace smb2pdu 1-element arrays with flex-arrays</title>
<updated>2023-02-20T23:25:43Z</updated>
<author>
<name>Kees Cook</name>
<email>keescook@chromium.org</email>
</author>
<published>2023-02-18T00:24:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=eb3e28c1e89b4984308777231887e41aa8a0151f'/>
<id>urn:sha1:eb3e28c1e89b4984308777231887e41aa8a0151f</id>
<content type='text'>
The kernel is globally removing the ambiguous 0-length and 1-element
arrays in favor of flexible arrays, so that we can gain both compile-time
and run-time array bounds checking[1].

Replace the trailing 1-element array with a flexible array in the
following structures:

	struct smb2_err_rsp
	struct smb2_tree_connect_req
	struct smb2_negotiate_rsp
	struct smb2_sess_setup_req
	struct smb2_sess_setup_rsp
	struct smb2_read_req
	struct smb2_read_rsp
	struct smb2_write_req
	struct smb2_write_rsp
	struct smb2_query_directory_req
	struct smb2_query_directory_rsp
	struct smb2_set_info_req
	struct smb2_change_notify_rsp
	struct smb2_create_rsp
	struct smb2_query_info_req
	struct smb2_query_info_rsp

Replace the trailing 1-element array with a flexible array, but leave
the existing structure padding:

	struct smb2_file_all_info
	struct smb2_lock_req

Adjust all related size calculations to match the changes to sizeof().

No machine code output or .data section differences are produced after
these changes.

[1] For lots of details, see both:
    https://docs.kernel.org/process/deprecated.html#zero-length-and-one-element-arrays
    https://people.kernel.org/kees/bounded-flexible-arrays-in-c

Cc: Steve French &lt;sfrench@samba.org&gt;
Cc: Paulo Alcantara &lt;pc@cjr.nz&gt;
Cc: Ronnie Sahlberg &lt;lsahlber@redhat.com&gt;
Cc: Shyam Prasad N &lt;sprasad@microsoft.com&gt;
Cc: Tom Talpey &lt;tom@talpey.com&gt;
Cc: Namjae Jeon &lt;linkinjeon@kernel.org&gt;
Cc: Sergey Senozhatsky &lt;senozhatsky@chromium.org&gt;
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Reviewed-by: Namjae Jeon &lt;linkinjeon@kernel.org&gt;
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>smb3: define missing create contexts</title>
<updated>2022-10-05T06:55:27Z</updated>
<author>
<name>Steve French</name>
<email>stfrench@microsoft.com</email>
</author>
<published>2022-10-02T03:52:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3afdfb0dd4baed45b7010e672e44c21fa790bace'/>
<id>urn:sha1:3afdfb0dd4baed45b7010e672e44c21fa790bace</id>
<content type='text'>
Update the list of create contexts to include the three
more recent ones and the one used for mounts to Macs.

Reviewed-by: Paulo Alcantara (SUSE) &lt;pc@cjr.nz&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>Add various fsctl structs</title>
<updated>2022-05-24T01:24:12Z</updated>
<author>
<name>Steve French</name>
<email>stfrench@microsoft.com</email>
</author>
<published>2022-05-23T02:14:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a42078b9e8983c7e2dc9a6e86239735e3a558083'/>
<id>urn:sha1:a42078b9e8983c7e2dc9a6e86239735e3a558083</id>
<content type='text'>
Add missing structure definition for various newer fsctl operations
  - duplicate_extents_ex
  - get_integrity_information
  - query_file_regions
  - query_on_disk_volume_info

And move some fsctl defintions to smbfs_common

Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>Add defines for various newer FSCTLs</title>
<updated>2022-05-24T01:23:57Z</updated>
<author>
<name>Steve French</name>
<email>stfrench@microsoft.com</email>
</author>
<published>2022-05-22T23:30:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=22c5b91336546000020fb47f4b80f4cbae47e78b'/>
<id>urn:sha1:22c5b91336546000020fb47f4b80f4cbae47e78b</id>
<content type='text'>
Checking MS-FSCC section 2.3 found six FSCTL defines
that were missing

Reviewed-by: David Disseldorp &lt;ddiss@suse.de&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>smb3: fix ksmbd bigendian bug in oplock break, and move its struct to smbfs_common</title>
<updated>2022-03-31T14:38:53Z</updated>
<author>
<name>Steve French</name>
<email>stfrench@microsoft.com</email>
</author>
<published>2022-03-28T22:45:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c7803b05f74bc3941b127f3155671e1944f632ae'/>
<id>urn:sha1:c7803b05f74bc3941b127f3155671e1944f632ae</id>
<content type='text'>
Fix an endian bug in ksmbd for one remaining use of
Persistent/VolatileFid that unnecessarily converted it (it is an
opaque endian field that does not need to be and should not
be converted) in oplock_break for ksmbd, and move the definitions
for the oplock and lease break protocol requests and responses
to fs/smbfs_common/smb2pdu.h

Also move a few more definitions for various protocol requests
that were duplicated (in fs/cifs/smb2pdu.h and fs/ksmbd/smb2pdu.h)
into fs/smbfs_common/smb2pdu.h including:

- various ioctls and reparse structures
- validate negotiate request and response structs
- duplicate extents structs

Reviewed-by: Paulo Alcantara (SUSE) &lt;pc@cjr.nz&gt;
Reviewed-by: Namjae Jeon &lt;linkinjeon@kernel.org&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
</feed>
