Re: [PATCH] nfsd: use xdr_encode_opaque_fixed for all GETXATTR fragments
From: Chuck Lever
Date: Tue Sep 15 2026 - 15:13:06 EST
On Tue, 15 Sep 2026 14:39:01 -0300, Aldo Ariel Panzardo wrote:
> nfsd4_vbuf_to_stream() already uses xdr_encode_opaque_fixed() when the
> final fragment is shorter than a page, but the preceding memcpy() in the
> loop body does not clear XDR padding.
>
> When the last fragment happens to be exactly PAGE_SIZE the short-fragment
> branch is never entered, and the loop exits through the normal buflen
> path. If that final page-sized reservation is not word-aligned within
> the XDR stream, its padding bytes are left stale.
>
> [...]
Applied to nfsd-testing, thanks!
[1/1] nfsd: use xdr_encode_opaque_fixed for all GETXATTR fragments
commit: 802e78a4db687ee132ae9c71992490c201fdc39e
--
Chuck Lever