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 9F2003FADE9 for ; Tue, 24 Mar 2026 16:38: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=1774370328; cv=pass; b=jfup1HI0jt3vCt4ObhzTlLbavrNCY0nFKqd7zWTFUaVWsOgseaLDFpVD4rcNhpra05Hw1Sq+35fOzbgqOX03GphakG/Vk+EnMwgEbbHyusAtTaxEA3HQ+d6cJiBqwksO339ESAT2WqRL4Kk2ZxtyDUJwJf0cLQBrmne6Lo+ioiw= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774370328; c=relaxed/simple; bh=/QXLpkKL1c3QN0ub8FhqnvA5K5Hud7n1FOx1VD3N0uw=; h=Date:From:To:CC:Subject:In-Reply-To:References:Message-ID: MIME-Version:Content-Type; b=rKKQfdXluRwle1RtF2t7CX5AwZxkPhyyQm/SiH9uY3Cp03adIfpMkJuIBHbiLvWCGSEGVLsB786JFNWP3pQ/FdrkiQJv2QCuGCUshakTPaZgLqVW06MdcEHPrSU/JY7PAViEoaU0DNwGoM42HevdHCL4HPoz3KzGYR3/QToqEKc= 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=D0ZFhNK1; 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="D0ZFhNK1" ARC-Seal: i=1; a=rsa-sha256; t=1774370313; cv=none; d=zohomail.eu; s=zohoarc; b=IObleD3fRI/gz+TACU1YjZ/9EleXig7EGxLKvuEO9nbrxi0faO/ZfYdsTC8Bk0i+MnrsOly1GfVxMCZSyTDRYSnrfzYxTx07TF1RYY4k6a/+JVHb5v2NM1wjaLcc1/K4b6VBrYtzZV62TGXtI1qQKf4oww1g7wfxbOSoiQaDCrE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1774370313; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=8DKyhHafbQftLzv5Wa1kMIRgUkE2ZGVlaZcfxDCvXQk=; b=R5aOG2eFcKBxrVFR7zMbYLbdNfEjQ0h4AYeOzfs8SxxdTR4qPHH9htfDOwLPbAO/v4a++/A6felFmC5j5K3o5YCK4Bm/nhWmrP24PfqAFC+EtsKnLaDKPhBkbcRd2HIBSd6Xhcf3Aed8mMTSz28Y8HXVg2Ww5ho3OUcRbfhx+iQ= 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=1774370313; s=zmail; d=objecting.org; i=objecting@objecting.org; h=Date:Date:From:From:To:To:CC:Subject:Subject:In-Reply-To:References:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-Id:Reply-To:Cc; bh=8DKyhHafbQftLzv5Wa1kMIRgUkE2ZGVlaZcfxDCvXQk=; b=D0ZFhNK1naX2zjAGj4AhEZ4r8zftjI3cjUBHq6XAgjUuInUXE9CXn8nCgpaGjfe1 lZ1V5KQwaKzmFCTkqDDSIp2ZvIdMoWps2fM1oyj0o6SrxFBfOCq7KGDNmcRFNv1qj4z A3BpXE4VR5778RvSppwf0oRHYT1Pd6QmwIjL8/rE= Received: by mx.zoho.eu with SMTPS id 1774370310368336.88234036112965; Tue, 24 Mar 2026 17:38:30 +0100 (CET) Date: Tue, 24 Mar 2026 16:38:29 +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: =?US-ASCII?Q?Re=3A_=5BPATCH_RESEND_0/3=5D_Fix_length_c?= =?US-ASCII?Q?alculation_bug_in_extract=5Fkvec=5Fto=5Fsg?= User-Agent: Thunderbird for Android In-Reply-To: <20260324000323.cqj4idfww2u7aner@ubuntu> References: <20260323212350.807118-1-lk@c--e.de> <20260324000323.cqj4idfww2u7aner@ubuntu> Message-ID: <997B9470-6210-4125-AABB-CE2CCA1EC697@objecting.org> 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=utf-8 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External On 24 March 2026 00:03:23 GMT, Josh Law wrote: >On Mon, 23 Mar 2026 22:23:47 +0100, Christian A=2E Ehrhardt wrote: >> There is a bug in extract_kvec_to_sg() where the length >> of a scatterlist segment is miscalculated=2E The actual fix >> is a one-liner and it is quite obvious from reading the >> code that this is what was intened=2E >>=20 >> 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=2E >>=20 >> The bug was orignally introduced into kernel v6=2E3 where the >> function lived in fs/netfs/iterator=2Ec=2E It was later moved >> to lib/scatterlist=2Ec in v6=2E5=2E Thus the actual fix is only >> marked for backports to v6=2E5+=2E >>=20 >> Christian A=2E 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 >>=20 >> lib/scatterlist=2Ec | 2 +- >> lib/tests/kunit_iov_iter=2Ec | 147 +++++++++++++++++++++++++++++++++++= +- >> 2 files changed, 147 insertions(+), 2 deletions(-) > >Reviewed-by: Josh Law (KUnit changes) Tested-By: Josh Law Great patch! Keep it up!