From: Mike Snitzer <snitzer@kernel.org>
To: linux-nfs@vger.kernel.org
Subject: xdr_stream interface oddities with pages vs stream
Date: Tue, 16 Dec 2025 17:26:23 -0500 [thread overview]
Message-ID: <aUHcjxer3GmVcBwG@kernel.org> (raw)
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?
Could this possibly be a regression due to more recent scratch buffer
changes?
Anyway.. I'm stabbing/fishing here and hoping someone else knows how
things _should_ work.
Thanks,
Mike
ps. I can expound on what I'm seeing, I just don't want to bury people
right out of the gate ;)
next reply other threads:[~2025-12-16 22:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-16 22:26 Mike Snitzer [this message]
2025-12-17 13:54 ` xdr_stream interface oddities with pages vs stream Chuck Lever
2025-12-18 16:56 ` Mike Snitzer
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=aUHcjxer3GmVcBwG@kernel.org \
--to=snitzer@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.