Message ID | 20210906224648.2062040-1-lsahlber@redhat.com (mailing list archive) |
---|---|
Headers | show |
Series | Start moving common cifs/ksmbd definitions into a common directory | expand |
Hi Ronnie, 2021-09-07 7:46 GMT+09:00, Ronnie Sahlberg <lsahlber@redhat.com>: > Steve, Namjae, > > Here is a start of work to share common definitions between the cifs client > and the server. > The patches build ontop of Namjaes patch to rework the smb2_hdr structure > that he recently sent to the list. > > It creates a new shared smb2pdu.h file and starts moving definitions over. > The two copies of smb2pdu.h, in cifs/ and ksmbd/ have diverged a bit > so some things are being renamed in these patches. > NegotiateProtocol is in two separate patches since for this funciton the > changes are a little more than just renames, for example I change several > arrays at the tail of structures from [number] to simply [] > so that needs careful review. > > Two patches are for cifs and cifs_common and two patches are for ksmbd. > The ksmbd patches depend on the cifs patches so the cifs patches have to go > in first. When I try build test with sparse, I can see build warnings. I will test more. $ make fs/ksmbd/ksmbd.ko C=1 CHECK=/home/linkinjeon/sparse-dev/sparse CF=-D__CHECK_ENDIAN__ ... CC [M] fs/ksmbd/unicode.o CHECK fs/ksmbd/unicode.c CC [M] fs/ksmbd/auth.o CHECK fs/ksmbd/auth.c fs/ksmbd/auth.c:1267:39: warning: cast to restricted __le64 CC [M] fs/ksmbd/vfs.o CHECK fs/ksmbd/vfs.c CC [M] fs/ksmbd/vfs_cache.o CHECK fs/ksmbd/vfs_cache.c CC [M] fs/ksmbd/server.o CHECK fs/ksmbd/server.c CC [M] fs/ksmbd/ndr.o CHECK fs/ksmbd/ndr.c CC [M] fs/ksmbd/misc.o CHECK fs/ksmbd/misc.c CC [M] fs/ksmbd/oplock.o CHECK fs/ksmbd/oplock.c CC [M] fs/ksmbd/connection.o CHECK fs/ksmbd/connection.c CC [M] fs/ksmbd/ksmbd_work.o CHECK fs/ksmbd/ksmbd_work.c CC [M] fs/ksmbd/crypto_ctx.o CHECK fs/ksmbd/crypto_ctx.c CC [M] fs/ksmbd/mgmt/ksmbd_ida.o CHECK fs/ksmbd/mgmt/ksmbd_ida.c CC [M] fs/ksmbd/mgmt/user_config.o CHECK fs/ksmbd/mgmt/user_config.c CC [M] fs/ksmbd/mgmt/share_config.o CHECK fs/ksmbd/mgmt/share_config.c CC [M] fs/ksmbd/mgmt/tree_connect.o CHECK fs/ksmbd/mgmt/tree_connect.c CC [M] fs/ksmbd/mgmt/user_session.o CHECK fs/ksmbd/mgmt/user_session.c CC [M] fs/ksmbd/smb_common.o CHECK fs/ksmbd/smb_common.c CC [M] fs/ksmbd/transport_tcp.o CHECK fs/ksmbd/transport_tcp.c CC [M] fs/ksmbd/transport_ipc.o CHECK fs/ksmbd/transport_ipc.c CC [M] fs/ksmbd/smbacl.o CHECK fs/ksmbd/smbacl.c CC [M] fs/ksmbd/smb2pdu.o CHECK fs/ksmbd/smb2pdu.c fs/ksmbd/smb2pdu.c:781:29: warning: incorrect type in assignment (different base types) fs/ksmbd/smb2pdu.c:781:29: expected unsigned int [usertype] Reserved fs/ksmbd/smb2pdu.c:781:29: got restricted __le32 [usertype] fs/ksmbd/smb2pdu.c:783:26: warning: incorrect type in assignment (different base types) fs/ksmbd/smb2pdu.c:783:26: expected unsigned int [usertype] Flags fs/ksmbd/smb2pdu.c:783:26: got restricted __le32 [usertype] fs/ksmbd/smb2pdu.c:794:29: warning: incorrect type in assignment (different base types) fs/ksmbd/smb2pdu.c:794:29: expected unsigned int [usertype] Reserved fs/ksmbd/smb2pdu.c:794:29: got restricted __le32 [usertype] fs/ksmbd/smb2pdu.c:8320:47: warning: cast to restricted __le64 fs/ksmbd/smb2pdu.c:8322:17: warning: cast to restricted __le64 CC [M] fs/ksmbd/smb2ops.o CHECK fs/ksmbd/smb2ops.c CC [M] fs/ksmbd/smb2misc.o CHECK fs/ksmbd/smb2misc.c ASN.1 fs/ksmbd/ksmbd_spnego_negtokeninit.asn1.[ch] CC [M] fs/ksmbd/ksmbd_spnego_negtokeninit.asn1.o CHECK fs/ksmbd/ksmbd_spnego_negtokeninit.asn1.c ASN.1 fs/ksmbd/ksmbd_spnego_negtokentarg.asn1.[ch] CC [M] fs/ksmbd/ksmbd_spnego_negtokentarg.asn1.o CHECK fs/ksmbd/ksmbd_spnego_negtokentarg.asn1.c CC [M] fs/ksmbd/asn1.o CHECK fs/ksmbd/asn1.c CC [M] fs/ksmbd/transport_rdma.o CHECK fs/ksmbd/transport_rdma.c LD [M] fs/ksmbd/ksmbd.o Thanks! > > >
On Tue, Sep 7, 2021 at 11:04 AM Namjae Jeon <linkinjeon@kernel.org> wrote: > > Hi Ronnie, > 2021-09-07 7:46 GMT+09:00, Ronnie Sahlberg <lsahlber@redhat.com>: > > Steve, Namjae, > > > > Here is a start of work to share common definitions between the cifs client > > and the server. > > The patches build ontop of Namjaes patch to rework the smb2_hdr structure > > that he recently sent to the list. > > > > It creates a new shared smb2pdu.h file and starts moving definitions over. > > The two copies of smb2pdu.h, in cifs/ and ksmbd/ have diverged a bit > > so some things are being renamed in these patches. > > NegotiateProtocol is in two separate patches since for this funciton the > > changes are a little more than just renames, for example I change several > > arrays at the tail of structures from [number] to simply [] > > so that needs careful review. > > > > Two patches are for cifs and cifs_common and two patches are for ksmbd. > > The ksmbd patches depend on the cifs patches so the cifs patches have to go > > in first. > When I try build test with sparse, I can see build warnings. > I will test more. Thanks. I have fixed the sparse warning and resent. > > $ make fs/ksmbd/ksmbd.ko C=1 CHECK=/home/linkinjeon/sparse-dev/sparse > CF=-D__CHECK_ENDIAN__ > > ... > CC [M] fs/ksmbd/unicode.o > CHECK fs/ksmbd/unicode.c > CC [M] fs/ksmbd/auth.o > CHECK fs/ksmbd/auth.c > fs/ksmbd/auth.c:1267:39: warning: cast to restricted __le64 > CC [M] fs/ksmbd/vfs.o > CHECK fs/ksmbd/vfs.c > CC [M] fs/ksmbd/vfs_cache.o > CHECK fs/ksmbd/vfs_cache.c > CC [M] fs/ksmbd/server.o > CHECK fs/ksmbd/server.c > CC [M] fs/ksmbd/ndr.o > CHECK fs/ksmbd/ndr.c > CC [M] fs/ksmbd/misc.o > CHECK fs/ksmbd/misc.c > CC [M] fs/ksmbd/oplock.o > CHECK fs/ksmbd/oplock.c > CC [M] fs/ksmbd/connection.o > CHECK fs/ksmbd/connection.c > CC [M] fs/ksmbd/ksmbd_work.o > CHECK fs/ksmbd/ksmbd_work.c > CC [M] fs/ksmbd/crypto_ctx.o > CHECK fs/ksmbd/crypto_ctx.c > CC [M] fs/ksmbd/mgmt/ksmbd_ida.o > CHECK fs/ksmbd/mgmt/ksmbd_ida.c > CC [M] fs/ksmbd/mgmt/user_config.o > CHECK fs/ksmbd/mgmt/user_config.c > CC [M] fs/ksmbd/mgmt/share_config.o > CHECK fs/ksmbd/mgmt/share_config.c > CC [M] fs/ksmbd/mgmt/tree_connect.o > CHECK fs/ksmbd/mgmt/tree_connect.c > CC [M] fs/ksmbd/mgmt/user_session.o > CHECK fs/ksmbd/mgmt/user_session.c > CC [M] fs/ksmbd/smb_common.o > CHECK fs/ksmbd/smb_common.c > CC [M] fs/ksmbd/transport_tcp.o > CHECK fs/ksmbd/transport_tcp.c > CC [M] fs/ksmbd/transport_ipc.o > CHECK fs/ksmbd/transport_ipc.c > CC [M] fs/ksmbd/smbacl.o > CHECK fs/ksmbd/smbacl.c > CC [M] fs/ksmbd/smb2pdu.o > CHECK fs/ksmbd/smb2pdu.c > fs/ksmbd/smb2pdu.c:781:29: warning: incorrect type in assignment > (different base types) > fs/ksmbd/smb2pdu.c:781:29: expected unsigned int [usertype] Reserved > fs/ksmbd/smb2pdu.c:781:29: got restricted __le32 [usertype] > fs/ksmbd/smb2pdu.c:783:26: warning: incorrect type in assignment > (different base types) > fs/ksmbd/smb2pdu.c:783:26: expected unsigned int [usertype] Flags > fs/ksmbd/smb2pdu.c:783:26: got restricted __le32 [usertype] > fs/ksmbd/smb2pdu.c:794:29: warning: incorrect type in assignment > (different base types) > fs/ksmbd/smb2pdu.c:794:29: expected unsigned int [usertype] Reserved > fs/ksmbd/smb2pdu.c:794:29: got restricted __le32 [usertype] > fs/ksmbd/smb2pdu.c:8320:47: warning: cast to restricted __le64 > fs/ksmbd/smb2pdu.c:8322:17: warning: cast to restricted __le64 > CC [M] fs/ksmbd/smb2ops.o > CHECK fs/ksmbd/smb2ops.c > CC [M] fs/ksmbd/smb2misc.o > CHECK fs/ksmbd/smb2misc.c > ASN.1 fs/ksmbd/ksmbd_spnego_negtokeninit.asn1.[ch] > CC [M] fs/ksmbd/ksmbd_spnego_negtokeninit.asn1.o > CHECK fs/ksmbd/ksmbd_spnego_negtokeninit.asn1.c > ASN.1 fs/ksmbd/ksmbd_spnego_negtokentarg.asn1.[ch] > CC [M] fs/ksmbd/ksmbd_spnego_negtokentarg.asn1.o > CHECK fs/ksmbd/ksmbd_spnego_negtokentarg.asn1.c > CC [M] fs/ksmbd/asn1.o > CHECK fs/ksmbd/asn1.c > CC [M] fs/ksmbd/transport_rdma.o > CHECK fs/ksmbd/transport_rdma.c > LD [M] fs/ksmbd/ksmbd.o > > Thanks! > > > > > >
Will review and merge tonight or tomorrow morning. On Mon, Sep 6, 2021 at 9:57 PM ronnie sahlberg <ronniesahlberg@gmail.com> wrote: > > On Tue, Sep 7, 2021 at 11:04 AM Namjae Jeon <linkinjeon@kernel.org> wrote: > > > > Hi Ronnie, > > 2021-09-07 7:46 GMT+09:00, Ronnie Sahlberg <lsahlber@redhat.com>: > > > Steve, Namjae, > > > > > > Here is a start of work to share common definitions between the cifs client > > > and the server. > > > The patches build ontop of Namjaes patch to rework the smb2_hdr structure > > > that he recently sent to the list. > > > > > > It creates a new shared smb2pdu.h file and starts moving definitions over. > > > The two copies of smb2pdu.h, in cifs/ and ksmbd/ have diverged a bit > > > so some things are being renamed in these patches. > > > NegotiateProtocol is in two separate patches since for this funciton the > > > changes are a little more than just renames, for example I change several > > > arrays at the tail of structures from [number] to simply [] > > > so that needs careful review. > > > > > > Two patches are for cifs and cifs_common and two patches are for ksmbd. > > > The ksmbd patches depend on the cifs patches so the cifs patches have to go > > > in first. > > When I try build test with sparse, I can see build warnings. > > I will test more. > > Thanks. I have fixed the sparse warning and resent. > > > > > $ make fs/ksmbd/ksmbd.ko C=1 CHECK=/home/linkinjeon/sparse-dev/sparse > > CF=-D__CHECK_ENDIAN__ > > > > ... > > CC [M] fs/ksmbd/unicode.o > > CHECK fs/ksmbd/unicode.c > > CC [M] fs/ksmbd/auth.o > > CHECK fs/ksmbd/auth.c > > fs/ksmbd/auth.c:1267:39: warning: cast to restricted __le64 > > CC [M] fs/ksmbd/vfs.o > > CHECK fs/ksmbd/vfs.c > > CC [M] fs/ksmbd/vfs_cache.o > > CHECK fs/ksmbd/vfs_cache.c > > CC [M] fs/ksmbd/server.o > > CHECK fs/ksmbd/server.c > > CC [M] fs/ksmbd/ndr.o > > CHECK fs/ksmbd/ndr.c > > CC [M] fs/ksmbd/misc.o > > CHECK fs/ksmbd/misc.c > > CC [M] fs/ksmbd/oplock.o > > CHECK fs/ksmbd/oplock.c > > CC [M] fs/ksmbd/connection.o > > CHECK fs/ksmbd/connection.c > > CC [M] fs/ksmbd/ksmbd_work.o > > CHECK fs/ksmbd/ksmbd_work.c > > CC [M] fs/ksmbd/crypto_ctx.o > > CHECK fs/ksmbd/crypto_ctx.c > > CC [M] fs/ksmbd/mgmt/ksmbd_ida.o > > CHECK fs/ksmbd/mgmt/ksmbd_ida.c > > CC [M] fs/ksmbd/mgmt/user_config.o > > CHECK fs/ksmbd/mgmt/user_config.c > > CC [M] fs/ksmbd/mgmt/share_config.o > > CHECK fs/ksmbd/mgmt/share_config.c > > CC [M] fs/ksmbd/mgmt/tree_connect.o > > CHECK fs/ksmbd/mgmt/tree_connect.c > > CC [M] fs/ksmbd/mgmt/user_session.o > > CHECK fs/ksmbd/mgmt/user_session.c > > CC [M] fs/ksmbd/smb_common.o > > CHECK fs/ksmbd/smb_common.c > > CC [M] fs/ksmbd/transport_tcp.o > > CHECK fs/ksmbd/transport_tcp.c > > CC [M] fs/ksmbd/transport_ipc.o > > CHECK fs/ksmbd/transport_ipc.c > > CC [M] fs/ksmbd/smbacl.o > > CHECK fs/ksmbd/smbacl.c > > CC [M] fs/ksmbd/smb2pdu.o > > CHECK fs/ksmbd/smb2pdu.c > > fs/ksmbd/smb2pdu.c:781:29: warning: incorrect type in assignment > > (different base types) > > fs/ksmbd/smb2pdu.c:781:29: expected unsigned int [usertype] Reserved > > fs/ksmbd/smb2pdu.c:781:29: got restricted __le32 [usertype] > > fs/ksmbd/smb2pdu.c:783:26: warning: incorrect type in assignment > > (different base types) > > fs/ksmbd/smb2pdu.c:783:26: expected unsigned int [usertype] Flags > > fs/ksmbd/smb2pdu.c:783:26: got restricted __le32 [usertype] > > fs/ksmbd/smb2pdu.c:794:29: warning: incorrect type in assignment > > (different base types) > > fs/ksmbd/smb2pdu.c:794:29: expected unsigned int [usertype] Reserved > > fs/ksmbd/smb2pdu.c:794:29: got restricted __le32 [usertype] > > fs/ksmbd/smb2pdu.c:8320:47: warning: cast to restricted __le64 > > fs/ksmbd/smb2pdu.c:8322:17: warning: cast to restricted __le64 > > CC [M] fs/ksmbd/smb2ops.o > > CHECK fs/ksmbd/smb2ops.c > > CC [M] fs/ksmbd/smb2misc.o > > CHECK fs/ksmbd/smb2misc.c > > ASN.1 fs/ksmbd/ksmbd_spnego_negtokeninit.asn1.[ch] > > CC [M] fs/ksmbd/ksmbd_spnego_negtokeninit.asn1.o > > CHECK fs/ksmbd/ksmbd_spnego_negtokeninit.asn1.c > > ASN.1 fs/ksmbd/ksmbd_spnego_negtokentarg.asn1.[ch] > > CC [M] fs/ksmbd/ksmbd_spnego_negtokentarg.asn1.o > > CHECK fs/ksmbd/ksmbd_spnego_negtokentarg.asn1.c > > CC [M] fs/ksmbd/asn1.o > > CHECK fs/ksmbd/asn1.c > > CC [M] fs/ksmbd/transport_rdma.o > > CHECK fs/ksmbd/transport_rdma.c > > LD [M] fs/ksmbd/ksmbd.o > > > > Thanks! > > > > > > > > >
2021-09-07 11:57 GMT+09:00, ronnie sahlberg <ronniesahlberg@gmail.com>: > On Tue, Sep 7, 2021 at 11:04 AM Namjae Jeon <linkinjeon@kernel.org> wrote: >> >> Hi Ronnie, >> 2021-09-07 7:46 GMT+09:00, Ronnie Sahlberg <lsahlber@redhat.com>: >> > Steve, Namjae, >> > >> > Here is a start of work to share common definitions between the cifs >> > client >> > and the server. >> > The patches build ontop of Namjaes patch to rework the smb2_hdr >> > structure >> > that he recently sent to the list. >> > >> > It creates a new shared smb2pdu.h file and starts moving definitions >> > over. >> > The two copies of smb2pdu.h, in cifs/ and ksmbd/ have diverged a bit >> > so some things are being renamed in these patches. >> > NegotiateProtocol is in two separate patches since for this funciton >> > the >> > changes are a little more than just renames, for example I change >> > several >> > arrays at the tail of structures from [number] to simply [] >> > so that needs careful review. >> > >> > Two patches are for cifs and cifs_common and two patches are for ksmbd. >> > The ksmbd patches depend on the cifs patches so the cifs patches have to >> > go >> > in first. >> When I try build test with sparse, I can see build warnings. >> I will test more. > > Thanks. I have fixed the sparse warning and resent. It work fine, and looks good to me. I will apply ksmbd's patches to my queue. and send them to Steve after cifs's patches are applied first. Thanks! > >> >> $ make fs/ksmbd/ksmbd.ko C=1 CHECK=/home/linkinjeon/sparse-dev/sparse >> CF=-D__CHECK_ENDIAN__ >> >> ... >> CC [M] fs/ksmbd/unicode.o >> CHECK fs/ksmbd/unicode.c >> CC [M] fs/ksmbd/auth.o >> CHECK fs/ksmbd/auth.c >> fs/ksmbd/auth.c:1267:39: warning: cast to restricted __le64 >> CC [M] fs/ksmbd/vfs.o >> CHECK fs/ksmbd/vfs.c >> CC [M] fs/ksmbd/vfs_cache.o >> CHECK fs/ksmbd/vfs_cache.c >> CC [M] fs/ksmbd/server.o >> CHECK fs/ksmbd/server.c >> CC [M] fs/ksmbd/ndr.o >> CHECK fs/ksmbd/ndr.c >> CC [M] fs/ksmbd/misc.o >> CHECK fs/ksmbd/misc.c >> CC [M] fs/ksmbd/oplock.o >> CHECK fs/ksmbd/oplock.c >> CC [M] fs/ksmbd/connection.o >> CHECK fs/ksmbd/connection.c >> CC [M] fs/ksmbd/ksmbd_work.o >> CHECK fs/ksmbd/ksmbd_work.c >> CC [M] fs/ksmbd/crypto_ctx.o >> CHECK fs/ksmbd/crypto_ctx.c >> CC [M] fs/ksmbd/mgmt/ksmbd_ida.o >> CHECK fs/ksmbd/mgmt/ksmbd_ida.c >> CC [M] fs/ksmbd/mgmt/user_config.o >> CHECK fs/ksmbd/mgmt/user_config.c >> CC [M] fs/ksmbd/mgmt/share_config.o >> CHECK fs/ksmbd/mgmt/share_config.c >> CC [M] fs/ksmbd/mgmt/tree_connect.o >> CHECK fs/ksmbd/mgmt/tree_connect.c >> CC [M] fs/ksmbd/mgmt/user_session.o >> CHECK fs/ksmbd/mgmt/user_session.c >> CC [M] fs/ksmbd/smb_common.o >> CHECK fs/ksmbd/smb_common.c >> CC [M] fs/ksmbd/transport_tcp.o >> CHECK fs/ksmbd/transport_tcp.c >> CC [M] fs/ksmbd/transport_ipc.o >> CHECK fs/ksmbd/transport_ipc.c >> CC [M] fs/ksmbd/smbacl.o >> CHECK fs/ksmbd/smbacl.c >> CC [M] fs/ksmbd/smb2pdu.o >> CHECK fs/ksmbd/smb2pdu.c >> fs/ksmbd/smb2pdu.c:781:29: warning: incorrect type in assignment >> (different base types) >> fs/ksmbd/smb2pdu.c:781:29: expected unsigned int [usertype] Reserved >> fs/ksmbd/smb2pdu.c:781:29: got restricted __le32 [usertype] >> fs/ksmbd/smb2pdu.c:783:26: warning: incorrect type in assignment >> (different base types) >> fs/ksmbd/smb2pdu.c:783:26: expected unsigned int [usertype] Flags >> fs/ksmbd/smb2pdu.c:783:26: got restricted __le32 [usertype] >> fs/ksmbd/smb2pdu.c:794:29: warning: incorrect type in assignment >> (different base types) >> fs/ksmbd/smb2pdu.c:794:29: expected unsigned int [usertype] Reserved >> fs/ksmbd/smb2pdu.c:794:29: got restricted __le32 [usertype] >> fs/ksmbd/smb2pdu.c:8320:47: warning: cast to restricted __le64 >> fs/ksmbd/smb2pdu.c:8322:17: warning: cast to restricted __le64 >> CC [M] fs/ksmbd/smb2ops.o >> CHECK fs/ksmbd/smb2ops.c >> CC [M] fs/ksmbd/smb2misc.o >> CHECK fs/ksmbd/smb2misc.c >> ASN.1 fs/ksmbd/ksmbd_spnego_negtokeninit.asn1.[ch] >> CC [M] fs/ksmbd/ksmbd_spnego_negtokeninit.asn1.o >> CHECK fs/ksmbd/ksmbd_spnego_negtokeninit.asn1.c >> ASN.1 fs/ksmbd/ksmbd_spnego_negtokentarg.asn1.[ch] >> CC [M] fs/ksmbd/ksmbd_spnego_negtokentarg.asn1.o >> CHECK fs/ksmbd/ksmbd_spnego_negtokentarg.asn1.c >> CC [M] fs/ksmbd/asn1.o >> CHECK fs/ksmbd/asn1.c >> CC [M] fs/ksmbd/transport_rdma.o >> CHECK fs/ksmbd/transport_rdma.c >> LD [M] fs/ksmbd/ksmbd.o >> >> Thanks! >> > >> > >> > >