> On May 3, 2021, at 1:59 PM, J. Bruce Fields <bfields@xxxxxxxxxxxx> wrote: > > On Mon, May 03, 2021 at 11:22:47AM -0400, Chuck Lever wrote: >> Same approach as what has been done for NFSv2, NFSv3, and NFSv4: XDR >> decoding and encoding functions have been updated to use xdr_stream. >> This adopts common XDR infrastructure for these functions and makes >> constructing and parsing more secure and robust. > > Nothing objectionable to me on a quick skim, but it doesn't build when I > apply to 5.12 (fs/lockd/svc.c:794:9: error: implicit declaration of > function ‘svcxdr_init_encode’). Should I take it from a git tree? It assumes the latest v5.13, which contains svcxdr_init_encode. But it is available in the nfsd_xdr_stream topic branch in this repo: git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux.git > --b. > >> >> --- >> >> Chuck Lever (29): >> lockd: Remove stale comments >> lockd: Create a simplified .vs_dispatch method for NLM requests >> lockd: Common NLM XDR helpers >> lockd: Update the NLMv1 void argument decoder to use struct xdr_stream >> lockd: Update the NLMv1 TEST arguments decoder to use struct xdr_stream >> lockd: Update the NLMv1 LOCK arguments decoder to use struct xdr_stream >> lockd: Update the NLMv1 CANCEL arguments decoder to use struct xdr_stream >> lockd: Update the NLMv1 UNLOCK arguments decoder to use struct xdr_stream >> lockd: Update the NLMv1 nlm_res arguments decoder to use struct xdr_stream >> lockd: Update the NLMv1 SM_NOTIFY arguments decoder to use struct xdr_stream >> lockd: Update the NLMv1 SHARE arguments decoder to use struct xdr_stream >> lockd: Update the NLMv1 FREE_ALL arguments decoder to use struct xdr_stream >> lockd: Update the NLMv1 void results encoder to use struct xdr_stream >> lockd: Update the NLMv1 TEST results encoder to use struct xdr_stream >> lockd: Update the NLMv1 nlm_res results encoder to use struct xdr_stream >> lockd: Update the NLMv1 SHARE results encoder to use struct xdr_stream >> lockd: Update the NLMv4 void arguments decoder to use struct xdr_stream >> lockd: Update the NLMv4 TEST arguments decoder to use struct xdr_stream >> lockd: Update the NLMv4 LOCK arguments decoder to use struct xdr_stream >> lockd: Update the NLMv4 CANCEL arguments decoder to use struct xdr_stream >> lockd: Update the NLMv4 UNLOCK arguments decoder to use struct xdr_stream >> lockd: Update the NLMv4 nlm_res arguments decoder to use struct xdr_stream >> lockd: Update the NLMv4 SM_NOTIFY arguments decoder to use struct xdr_stream >> lockd: Update the NLMv4 SHARE arguments decoder to use struct xdr_stream >> lockd: Update the NLMv4 FREE_ALL arguments decoder to use struct xdr_stream >> lockd: Update the NLMv4 void results encoder to use struct xdr_stream >> lockd: Update the NLMv4 TEST results encoder to use struct xdr_stream >> lockd: Update the NLMv4 nlm_res results encoder to use struct xdr_stream >> lockd: Update the NLMv4 SHARE results encoder to use struct xdr_stream >> >> >> fs/lockd/svc.c | 43 ++++ >> fs/lockd/svcxdr.h | 151 ++++++++++++++ >> fs/lockd/xdr.c | 402 ++++++++++++++++++------------------ >> fs/lockd/xdr4.c | 403 +++++++++++++++++++------------------ >> include/linux/lockd/xdr.h | 6 - >> include/linux/lockd/xdr4.h | 7 +- >> 6 files changed, 610 insertions(+), 402 deletions(-) >> create mode 100644 fs/lockd/svcxdr.h >> >> -- >> Chuck Lever -- Chuck Lever