From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from sender-of-o57.zoho.eu (sender-of-o57.zoho.eu [136.143.169.57]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9BDD64414 for ; Tue, 24 Mar 2026 00:03:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=136.143.169.57 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774310628; cv=pass; b=nTyV5WS2MiNJ1ORgGwH3x3ev1mo6+YjEXW65puWqmBlScUDq3JoqbQZLoTBpbfiwnr7FslVfNNRRkNdmFYb0Ush6FrOdNb6eNbughKEI6ZQmNLt9Sjc25X1/OXV84oEp/QfDuNyAg08Yf8fqq80/JhE44ehlVr8iruxqceGRkT8= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774310628; c=relaxed/simple; bh=4Tx05lick0iqR7npiBk0afHSByvvm1Xu2PRE1PcoAQc=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type:Content-Disposition; b=F3mRmqqSei6Ff/ocveWT2rhB1z+FCKU62z/vTtge5qauyuDDsFNwizEMcboyD+aEDVO05sY7qVHjMm9kJPY05WWrb8pSoyqKjVW0UV13NNbS8GiqQ7avPg69+8UNTSVCwu4f2ZRfUYz6yJqZuPZxAHOzYa7qNvc61hQ567Hh0R4= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=objecting.org; spf=pass smtp.mailfrom=objecting.org; dkim=pass (1024-bit key) header.d=objecting.org header.i=objecting@objecting.org header.b=auEnJCdw; arc=pass smtp.client-ip=136.143.169.57 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=objecting.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=objecting.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=objecting.org header.i=objecting@objecting.org header.b="auEnJCdw" ARC-Seal: i=1; a=rsa-sha256; t=1774310606; cv=none; d=zohomail.eu; s=zohoarc; b=Nqor8pbgSR7bBdzfIYFqgzMxYXvutHKa5Nk4LkieZ4eSImDJ+HYDnIRRvGCaM8ZYXb/CAjyRowpxpBxx5dzIC4J49lCBtx/Wi9rmyUkaVQNFKXvb2lZ7nsKWMlIM3bS82qYT8K4YcqWv5kv8rH5tf98/fPsOMQetycescvZZFwE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1774310606; h=Content-Type:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=18sXTqOB2pAoLn/KWBH2ZY/TYrZ7rvkeIFTLkZ6UANQ=; b=NHMccBonLG8nmK1Nh65Q6VMJ9k8rKVAh38SGd+sHRCOeIA38xmP0eZHdqTqcyZlW5XXs6UUCkJxAJsF61IqNTqjN4qXfoKgs+wnm3XnLp7GYezAwvevjtIzA+Zidrr8LXsL4dkS6360sph8cKqJgQpWIVKNc74oND0oZsLcXjek= ARC-Authentication-Results: i=1; mx.zohomail.eu; dkim=pass header.i=objecting.org; spf=pass smtp.mailfrom=objecting@objecting.org; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1774310606; s=zmail; d=objecting.org; i=objecting@objecting.org; h=Date:Date:From:From:To:To:Cc:Cc:Subject:Subject:Message-ID:In-Reply-To:References:MIME-Version:Content-Type:Message-Id:Reply-To; bh=18sXTqOB2pAoLn/KWBH2ZY/TYrZ7rvkeIFTLkZ6UANQ=; b=auEnJCdwvI3WtExLGmU9rmuT1794JbOJj5OQYG/j9wv5AvNlSEKpm7jgsIewWRXn WDOgtts5Tpu9Tby4vgi+cucU2O5uWwqfS/mvU5JINbOd5Y9c4ScpiHW2zoQIxAjxgm5 loOj+P0edVlhb3RuFp0xuTkzYIB4RgsRDMYbvsBU= Received: by mx.zoho.eu with SMTPS id 1774310605012237.82327525606627; Tue, 24 Mar 2026 01:03:25 +0100 (CET) Date: Tue, 24 Mar 2026 00:03:23 +0000 From: Josh Law To: linux-kernel@vger.kernel.org, akpm@linux-foundation.org, dhowells@redhat.com Cc: lk@c--e.de, kees@kernel.org, pmladek@suse.com, davidgow@google.com Subject: Re: [PATCH RESEND 0/3] Fix length calculation bug in extract_kvec_to_sg Message-ID: <20260324000323.cqj4idfww2u7aner@ubuntu> In-Reply-To: <20260323212350.807118-1-lk@c--e.de> References: <20260323212350.807118-1-lk@c--e.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-ZohoMailClient: External On Mon, 23 Mar 2026 22:23:47 +0100, Christian A. Ehrhardt wrote: > There is a bug in extract_kvec_to_sg() where the length > of a scatterlist segment is miscalculated. The actual fix > is a one-liner and it is quite obvious from reading the > code that this is what was intened. > > As this is a core library function this series first adds > test cases to the kunit_iov_iter test that demonstrate that > there is a bug before actually fixing it in the last commit. > > The bug was orignally introduced into kernel v6.3 where the > function lived in fs/netfs/iterator.c. It was later moved > to lib/scatterlist.c in v6.5. Thus the actual fix is only > marked for backports to v6.5+. > > Christian A. Ehrhardt (3): > lib: kunit_iov_iter: Improve error detection > lib: kunit_iov_iter: Add tests for extract_iter_to_sg > lib: Fix length calculation in extract_kvec_to_sg > > lib/scatterlist.c | 2 +- > lib/tests/kunit_iov_iter.c | 147 ++++++++++++++++++++++++++++++++++++- > 2 files changed, 147 insertions(+), 2 deletions(-) Reviewed-by: Josh Law