Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1650459pxu; Tue, 24 Nov 2020 05:54:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJx4ZIe3iBoysBnXeP8XMsM50Y9X3XJ/lZ8ETVShdEUi9U2EtDF7Z9+INKH63+ld4o+ElnVA X-Received: by 2002:a05:6402:1818:: with SMTP id g24mr4074659edy.313.1606226041725; Tue, 24 Nov 2020 05:54:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606226041; cv=none; d=google.com; s=arc-20160816; b=FlVf/2R88x42+RP8Bs6Zc4SdKAvQahWm6M4amrVP72Ox8iR/FUs/zaVhWyIDIZkK7k jrlxxZEjwazBX0gZbKorZw95ov80wI+FkrAL+0fF3QlOpcY4B2jP5MY43B59uVruUkU5 A+YfrDpyMtILg1pY6rKlpK9Dg5UmWXLgLyQcX++7nSmGi2YUpnuxMLpkNALaQED0cHjQ vH0caaa7Y+X6wjIkH/eOlNVFonNl7Oq9ONE3LRdUApbMvOUYne1K9C/CxSSw3cuHdbAn Ig6RHBABSiGauVj5q0RcSZrigxZA9/NKIZThHkN5fso1c2nGo4U76LtVerBvvwZBch36 1/XQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:to:from:dkim-signature; bh=7dvYxWoMSkGySacaKlw4SEsjMyQJouIsQhZmHdGB5W0=; b=q8SKBDTCUQMaqKitN2RG8aJThtyvFNVm/8k5do2rZy88XL/YU0qB4o7T3MMyvMl5mI cXnIEXySsSSbIFXb8YAkY4OaBdFl6/xSdmmpF/DDYRBhlK9jCTGuOtFa2lgdvdUor0/X 9DLFmZqSpW4IWdAMcdHSJK8LT3pQiXVygqrL1OALsTeQwhLBjEfpWy8gYlhpHrJNfIPc 1J7QPE5AE0VnfEfq8XqKJAF5kpVU3C6OtxwKsAuxmw++7WJL0xgyVJrLT6DnXoOZxsKR GIMV+kl0uhobyJ/Alz2GlwTM0KxgdimfUJqqmDK2iln+4fq72L59XfIfABZ5Oj6fp+Ss PIxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=TsG0sQFS; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d23si8470466ejd.151.2020.11.24.05.53.23; Tue, 24 Nov 2020 05:54:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=TsG0sQFS; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388571AbgKXNu2 (ORCPT + 99 others); Tue, 24 Nov 2020 08:50:28 -0500 Received: from mail.kernel.org ([198.145.29.99]:44660 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388565AbgKXNu1 (ORCPT ); Tue, 24 Nov 2020 08:50:27 -0500 Received: from leira.hammer.space (c-68-36-133-222.hsd1.mi.comcast.net [68.36.133.222]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1ACFD20888 for ; Tue, 24 Nov 2020 13:50:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1606225827; bh=riwhDargQCc8k6XO86aIGZOD9ToDmKRTu7KD2kUQ/wI=; h=From:To:Subject:Date:From; b=TsG0sQFSyGFbuWOZwuAolHx26bCT0aJu2eh1qzc+YOxb/5BJza+IbszKi5NYYoQLw 1d/cqBaFrhf5rRuJxs1HgBw2euL6mD23EiS11xtWrcc+CQh1i0Xd+uf39HzAXw5LmC /BcyWnLrxs4uDX23FgE/bWJ27oNxnBEwWmOyONM4= From: trondmy@kernel.org To: linux-nfs@vger.kernel.org Subject: [PATCH v2 0/9] Fix various issues in the SUNRPC xdr code Date: Tue, 24 Nov 2020 08:50:16 -0500 Message-Id: <20201124135025.1097571-1-trondmy@kernel.org> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org From: Trond Myklebust When looking at the issues raised by Tigran's testing of the NFS client updates, I noticed a couple of things in the generic SUNRPC xdr code that want to be fixed. This patch series replaces an earlier series that attempted to just fix the XDR padding in the NFS code. This series fixes up a number of issues w.r.t. bounds checking in the xdr_stream code. It corrects the behaviour of xdr_read_pages() for the case where the XDR object size is larger than the buffer page array length and simplifies the code. v2: - Clean up the handling of page padding in rpc_prepare_reply_pages() - Fix up the initial read_plus() page alignment Trond Myklebust (9): NFSv4: Fix the alignment of page data in the getdeviceinfo reply SUNRPC: Fix up typo in xdr_init_decode() SUNRPC: Clean up helpers xdr_set_iov() and xdr_set_page_base() SUNRPC: Fix up xdr_read_pages() to take arbitrary object lengths SUNRPC: Clean up the handling of page padding in rpc_prepare_reply_pages() SUNRPC: Fix up xdr_set_page() SUNRPC: Fix open coded xdr_stream_remaining() NFSv4: Fix open coded xdr_stream_remaining() NFSv4.2: Fix up read_plus() page alignment fs/nfs/nfs2xdr.c | 19 ++++----- fs/nfs/nfs3xdr.c | 29 +++++++------ fs/nfs/nfs42xdr.c | 4 +- fs/nfs/nfs4xdr.c | 48 ++++++++++++---------- net/sunrpc/clnt.c | 5 +-- net/sunrpc/xdr.c | 101 +++++++++++++++++++++------------------------- 6 files changed, 103 insertions(+), 103 deletions(-) -- 2.28.0