All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Snitzer <snitzer@kernel.org>
To: Chuck Lever <cel@kernel.org>
Cc: linux-nfs@vger.kernel.org
Subject: Re: xdr_stream interface oddities with pages vs stream
Date: Thu, 18 Dec 2025 11:56:07 -0500	[thread overview]
Message-ID: <aUQyJ4Bn-UvGuwI6@kernel.org> (raw)
In-Reply-To: <cafae1f3-def3-4b64-ae1e-9d4714d91b5c@app.fastmail.com>

On Wed, Dec 17, 2025 at 08:54:36AM -0500, Chuck Lever wrote:
> 
> 
> On Tue, Dec 16, 2025, at 5:26 PM, Mike Snitzer wrote:
> > Hi,
> >
> > I've been working on enhancing the NFS client and server such that
> > nfs4_{set,set}acl utilities to set/get 4.0 ACLs will work when NFSD
> > v4.1 is reexporting NFS v4.2.  Its soul sucking, but that aside...
> >
> > In my journey I'm finding that xdr_stream_decode_u32() followed by
> > xdr_stream_subsegment() doesn't continue from the point where
> > xdr_stream_decode_u32() advanced xdr_stream's ->p
> >
> > xdr_stream_subsegment() doesn't appear in any way interlocked with the
> > pages offset (->p), it starts with xdr_stream_pos() but  ends with
> > advancing ->p.  So xdr_stream_subsegment() does what it should, I'm
> > concerned about interfaces like xdr_stream_decode_u32() not advancing
> > xdr->nwords
> >
> > Shouldn't both the xdr->p and xdr->nwords be interlocked?  SO that
> > xdr_stream_subsegment() continues from the point where
> > xdr_stream_decode_u32() advanced the stream?
> 
> From the wasteland that is my memory... I think only one side
> uses nwords, and I'm betting it's the encode side. These aren't
> exactly symmetrical APIs, and the differences can be subtle.

It was just user error on my part.. (I had expected the acl_pages to
be aligned at the start of the first page in the subsegment I
extracted, but it was offset within that first page).

Move along nothing to see here! ;)

Thannks,
Mike

      reply	other threads:[~2025-12-18 16:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-16 22:26 xdr_stream interface oddities with pages vs stream Mike Snitzer
2025-12-17 13:54 ` Chuck Lever
2025-12-18 16:56   ` Mike Snitzer [this message]

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=aUQyJ4Bn-UvGuwI6@kernel.org \
    --to=snitzer@kernel.org \
    --cc=cel@kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.