linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* xdr_stream interface oddities with pages vs stream
@ 2025-12-16 22:26 Mike Snitzer
  2025-12-17 13:54 ` Chuck Lever
  0 siblings, 1 reply; 3+ messages in thread
From: Mike Snitzer @ 2025-12-16 22:26 UTC (permalink / raw)
  To: linux-nfs

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 ;)


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-12-18 16:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).