public inbox for linux-cifs@vger.kernel.org
 help / color / mirror / Atom feed
From: Sergey Senozhatsky <senozhatsky@chromium.org>
To: Namjae Jeon <linkinjeon@kernel.org>
Cc: Sergey Senozhatsky <senozhatsky@chromium.org>,
	linux-cifs@vger.kernel.org, smfrench@gmail.com, tom@talpey.com,
	atteh.mailbox@gmail.com, Steve French <stfrench@microsoft.com>
Subject: Re: [PATCH] ksmbd: return unsupported error on smb1 mount
Date: Thu, 23 Mar 2023 14:00:06 +0900	[thread overview]
Message-ID: <20230323050006.GB3271889@google.com> (raw)
In-Reply-To: <CAKYAXd-PQFcVq=b_KNq6P5imBV-Y+PQ5LBZCzH-mH7dmZAav+w@mail.gmail.com>

On (23/03/23 13:10), Namjae Jeon wrote:
[..]
> >> +	/*
> >> +	 * Remove 4 byte direct TCP header, add 1 byte wc, 2 byte bcc
> >> +	 * and 2 byte DialectIndex.
> >> +	 */
> >> +	*(__be32 *)work->response_buf =
> >> +		cpu_to_be32(sizeof(struct smb_hdr) - 4 + 2 + 2);
> >
> > 	In other words cpu_to_be32(sizeof(struct smb_hdr)).
> Yes, that's possible too, but wouldn't this make the comments easier
> to understand..?

Maybe, but the comment says "-4 + 1 + 2 + 2", which doesn't match the code.

> >> +	*(__le32 *)neg_rsp->hdr.Protocol = SMB1_PROTO_NUMBER;
> >
> > 	I assume this should say cpu_to_le32(SMB1_PROTO_NUMBER).
> SMB1_PROTO_NUMBER is declared as:
> #define SMB1_PROTO_NUMBER		cpu_to_le32(0x424d53ff)

Oh, I see.

  reply	other threads:[~2023-03-23  5:00 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-21 13:33 [PATCH] ksmbd: don't terminate inactive sessions after a few seconds Namjae Jeon
2023-03-21 13:33 ` [PATCH] ksmbd: return STATUS_NOT_SUPPORTED on unsupported smb2.0 dialect Namjae Jeon
2023-03-21 13:33 ` [PATCH] ksmbd: return unsupported error on smb1 mount Namjae Jeon
2023-03-23  2:53   ` Sergey Senozhatsky
2023-03-23  4:10     ` Namjae Jeon
2023-03-23  5:00       ` Sergey Senozhatsky [this message]
2023-03-23  5:04         ` Namjae Jeon
2023-03-23  5:17           ` [PATCH v2] " Namjae Jeon
2023-03-24  3:44             ` Sergey Senozhatsky
2023-03-24  3:50 ` [PATCH] ksmbd: don't terminate inactive sessions after a few seconds Sergey Senozhatsky
2023-03-24  4:28   ` Namjae Jeon
2023-03-24  5:45     ` Sergey Senozhatsky
2023-03-24  7:00       ` Namjae Jeon
2023-03-24  5:43 ` Sergey Senozhatsky

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=20230323050006.GB3271889@google.com \
    --to=senozhatsky@chromium.org \
    --cc=atteh.mailbox@gmail.com \
    --cc=linkinjeon@kernel.org \
    --cc=linux-cifs@vger.kernel.org \
    --cc=smfrench@gmail.com \
    --cc=stfrench@microsoft.com \
    --cc=tom@talpey.com \
    /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