From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 353213B7B7F for ; Mon, 10 Aug 2026 22:58:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786402712; cv=none; b=epbCp+zeOc3FJArGzOGuS8oVC79mjObIDlPMhTe2vuYvlsv70H+nel3esnLSIRJIFcD2VW8NetXBlRXVW2b1WR65477GX8zaUcDDhrfajC398dZzM40N5c9R+11ETxpnU4loEmwdWKIoCFeJSExJI/ljCDTSre3UUtkrlDrChII= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786402712; c=relaxed/simple; bh=d+HRaA8t7PYV340BS207L05bU2E0wAqRhfar0bGqecU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=iDMy+tlEDnrbm0VW2nRJ7AQZLLmOsNl1bCM5JTrLcvXwcKD0kJVxSH4ejNBbAXTQ5XRemXsvwUs9EgY6rtf0uhv36RrQjeQez63OhsppRc2k9QuF9HafsguqfHUQAlTpZmTyBA2RedjbCJMnegN8mIEJDdkPHSGUmsnRXU3eCY4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=EnwgDped; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="EnwgDped" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 966151F000E9; Mon, 10 Aug 2026 22:58:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1786402710; bh=D8luZD/ETggNcgRGx5qEthGGSBDvYKh2Fm8hDcEdZrs=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=EnwgDpedJ2DRn6vh/beAilYrsIQAG5G2pby6JGEyXeCTguW3z6lv3EvU0IWvHizP7 ok+TkqkgDxI08O9ehaZ4Wvq7dZCwudoR5thWQEG7XCWLuDcb9JkBjiD6b5YKgiltPy qr2SYeNQdLzETOEtexNHe5iQvwZ6k1BMEGkssyZQUdIl6w5qlfnXWpu79Rbl9XL5WZ kiRTzXBP2lq1ndCErEAZYU36YJjXgPVKK4/us8QTPXyQSBXSeHbvxQWrUD7B4uOCHn NOOzbLMfYVRHvgBct/041QFFEzsNaQthDGJwKF2XO2lwE5VsUrL3arh1J0IzpbW4Zc K0yVBgh22AQ9g== Date: Mon, 10 Aug 2026 16:58:29 -0600 From: Keith Busch To: Yehyeong Lee Cc: linux-nvme@lists.infradead.org, axboe@kernel.dk, hch@lst.de, sagi@grimberg.me, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 0/2] nvme-tcp: two checks on the C2HData receive path Message-ID: References: <20260801081818.1884199-1-yhlee@isslab.korea.ac.kr> 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 In-Reply-To: <20260801081818.1884199-1-yhlee@isslab.korea.ac.kr> On Sat, Aug 01, 2026 at 05:18:16PM +0900, Yehyeong Lee wrote: > Two problems on the nvme-tcp host receive path, both reachable by a > controller sending a C2HData PDU that does not match the command. > > 1/2: nothing compares the bytes actually received against the length the > command asked for, so a 4096-byte read answered with 512 bytes completes > as fully successful. > > 2/2: the C2HData gate reads blk_rq_payload_bytes() without first > checking blk_rq_nr_phys_segments(), the rule commit 25e5cb780e62 > ("nvme-tcp: fix possible crash in write_zeroes processing") established > for the send path. This looks good to me. I'll get this queued up if I don't hear any concerns.