linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: Tom Talpey <tom@talpey.com>
Cc: dhowells@redhat.com, Steve French <sfrench@samba.org>,
	Paulo Alcantara <pc@manguebit.org>,
	Shyam Prasad N <sprasad@microsoft.com>,
	Stefan Metzmacher <metze@samba.org>,
	linux-cifs@vger.kernel.org, netfs@lists.linux.dev,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 05/11] cifs: Remove the RFC1002 header from smb_hdr
Date: Mon, 24 Nov 2025 19:56:34 +0000	[thread overview]
Message-ID: <3649836.1764014194@warthog.procyon.org.uk> (raw)
In-Reply-To: <fe428483-6564-4f18-bd1a-cc1150941da5@talpey.com>

Tom Talpey <tom@talpey.com> wrote:

> On 11/24/2025 7:42 AM, David Howells wrote:
> > Remove the RFC1002 header from struct smb_hdr as used for SMB-1.0.  This
> > simplifies the SMB-1.0 code by simplifying a lot of places that have to add
> > or subtract 4 to work around the fact that the RFC1002 header isn't really
> > part of the message and the base for various offsets within the message is
> > from the base of the smb_hdr, not the RFC1002 header.
> 
> This is truly great, RFC1002 is a framing layer and separating it from
> the upper SMB code is long overdue.
> 
> But... isn't this applicable to SMB2/3? The commit log implies it's SMB1
> only (nit there's no such thing as "SMB-1.0"), which is weird given the
> commit applies to many smb2<foo> files.

SMB2/3 doesn't have the RFC1002 headers included in struct smb2_hdr,
presumably because of the compound chaining, so nothing needed doing in that
respect.  This harmonises SMB1 with SMB2/3.

> And, are similar changes envisioned in the ksmbd code?

None required AFAIK as that doesn't support SMB1?

David


  parent reply	other threads:[~2025-11-24 19:56 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-24 12:42 [PATCH v4 00/11] cifs: Miscellaneous prep patches for rewrite of I/O layer David Howells
2025-11-24 12:42 ` [PATCH v4 01/11] cifs: Use netfs_alloc/free_folioq_buffer() David Howells
2025-11-24 12:42 ` [PATCH v4 02/11] cifs: Do some preparation prior to organising the function declarations David Howells
2025-11-24 12:42 ` [PATCH v4 03/11] cifs: Clean up declarations David Howells
2025-11-24 12:42 ` [PATCH v4 04/11] cifs: Rename mid_q_entry to smb_message David Howells
2025-11-24 12:42 ` [PATCH v4 05/11] cifs: Remove the RFC1002 header from smb_hdr David Howells
2025-11-24 17:27   ` Tom Talpey
2025-11-24 19:56   ` David Howells [this message]
2025-11-24 12:42 ` [PATCH v4 06/11] cifs: Make smb1's SendReceive() wrap cifs_send_recv() David Howells
2025-11-24 12:42 ` [PATCH v4 07/11] cifs: Clean up some places where an extra kvec[] was required for rfc1002 David Howells
2025-11-24 14:20   ` Stefan Metzmacher
2025-11-24 14:36   ` David Howells
2025-11-24 14:40     ` Stefan Metzmacher
2025-11-24 14:44     ` David Howells
2025-11-24 14:46       ` Stefan Metzmacher
2025-11-25 11:11       ` David Howells
2025-11-25 11:19         ` Stefan Metzmacher
2025-11-24 12:42 ` [PATCH v4 08/11] cifs: Replace SendReceiveBlockingLock() with SendReceive() plus flags David Howells
2025-11-24 12:42 ` [PATCH v4 09/11] cifs: Remove the server pointer from smb_message David Howells
2025-11-24 12:42 ` [PATCH v4 10/11] cifs: Don't need state locking in smb2_get_mid_entry() David Howells
2025-11-24 12:42 ` [PATCH v4 11/11] cifs: Add a tracepoint to log EIO errors David Howells
2025-11-24 14:22   ` Stefan Metzmacher
2025-11-24 14:38   ` David Howells

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=3649836.1764014194@warthog.procyon.org.uk \
    --to=dhowells@redhat.com \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=metze@samba.org \
    --cc=netfs@lists.linux.dev \
    --cc=pc@manguebit.org \
    --cc=sfrench@samba.org \
    --cc=sprasad@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;
as well as URLs for NNTP newsgroup(s).