From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796303642; b=K9xB7NnoJy1kY0sJ7bHaKBR/sfjqIIuDUxXCWsQqStbsa4J4AuPfnMs0zDdyDB10rbtB vfMV6Cw11QTFvLHj7/fWYvrw9uvLc8IS6hkQjhQSXVaU4ClqVS/is3rS6v+HaZVs5cRd6 qMOaGCaqgB/e0VAydDXCnh+bprIi8Wse1mcPmxkmZs0xEir/qzVNzLGy1gWskE28/DWlN azTZNO6XTJCPudI/1S4RDiKPm6qqzPjIIZoi3OSkwaQBQRMnw5rjhJzgJXg+hqRHGRqqB GOA0L1uB8tu2YwMuYnERLuWmV0Irefmxg6DNpZDnx+PWFSxd7bvZTNyavS08hE336mg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796303642; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=59uyQ2J63q/KNPRHY2TjuUzlxSNi3WVmdpMtRHGcA54=; b=nXy+MhkL3TRxEzvNSLvDweEqKHKPSC5KCh3gWJE0cRh+c938uNJpTAgwrgjihXFuKta+ kTbMcImBMsHL2Gi81g4l/YcDToeTg/w0D1w22iZ0y/x1TYK93s9tYTrQmXG+k/48JU7Vh 0mQo9uHEHZ2fMEjtar6onSMu02VQIxWN7M3N4qlxqKH/d0zMweAskSuIZt/4eYaoRVhFw wAnXK9gnd8wr/iWKnEbS9fsO4vtLJ3VldOnJjbbg0xTgIVLX2SSvjo8I3KIM2dsOw5O2x BEVTaQcq06ovAolCQJunF+PWXkIkY8iy4AL2eYafgM6gx+52RUCafs750P+bXDnPr3w== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=ECIgd6dX; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E3FA3606A322 for ; Thu, 3 Dec 2026 13:14:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=ECIgd6dX Received: by smtp.kernel.org (Postfix) with ESMTPSA id 74C841F00896; Thu, 3 Dec 2026 13:14:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796303641; bh=59uyQ2J63q/KNPRHY2TjuUzlxSNi3WVmdpMtRHGcA54=; h=From:Subject:Reply-To:To:In-Reply-To:References:Date; b=ECIgd6dXB6Ou7ixf4/Gsoa8M+ugHkEYdP+bsw0zCZMz5EBil4wZvrVw2iJosHJ2TJ Obfpo4mlv6NFqaVvAsxABnzAwTIUYJOdnzcZ4dGkyiWhJVnwNT1Tn0ZeTYQIRyK7Ys pDBOSlXLnaUKyEGFM7rRI2R3f8qJPo6ksswXxPQjd6K2r5GVNYix2eehiDJ2xAONqg z4B0O/awW1SBZ2MTn3pj//7DDMS7wdzDSf4okS7q85KnJkVFD07Vn2olIPCbAqgvmW czIwqyVm4UhCzylH0EGFo+iUN1CRKEXBDhuUxzQ9bmghcywAbO+P+lJM1qx9z2j3V/ xb99q9rFVl54g== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v3] RDMA/cxgb4: fix the length of large fast-reg MRs Reply-To: sashiko-reviews@lists.linux.dev To: "Showrya M N" , linux-rdma@vger.kernel.org In-Reply-To: <20261203222608.12907-1-showrya@chelsio.com> References: <20261203185637.27223-1-showrya@chelsio.com> <20261203222608.12907-1-showrya@chelsio.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Thu, 03 Dec 2026 13:14:01 +0000 X-Mailing-List: linux-rdma@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Low] RDMA/cxgb4: inaccurate Fixes tag 2550a88d956f for fast-reg 8GB limit -- commit aee0ad15cad4c821862d1e5049a62a4e608edfbc Author: Potnuri Bharat Teja > RDMA/cxgb4: fix the length of large fast-reg MRs > > ib_mr.length is a u64 and cxgb4 advertises max_mr_size as ~0ULL, but > build_memreg() and build_tpte_memreg() always program len_hi as 0 and > truncate the length into len_lo. A kernel fast-reg MR of 4GB or more, > e.g. one mapped with a large page size, is therefore registered in HW > with a truncated length. > > Program len_hi/len_lo from the upper and lower 32 bits of the MR length, > as write_tpt_entry() already does for regular MRs. > > Also, T4 and T5 can't handle MRs of 8GB or more. c4iw_reg_user_mr() > already rejects such MRs via mr_exceeds_hw_limits(), but fast-reg MRs > get their length only in c4iw_map_mr_sg() and are never checked. With > DSGL, a fast-reg MR holds up to 128 pages of up to 128MB, so it can > reach 16GB. Apply the same limit in c4iw_map_mr_sg() and fail the > mapping with -EINVAL. > > Fixes: edd31551148c ("IB: Correct MR length field to be 64-bit") > Fixes: 2550a88d956f ("RDMA/cxgb4: Limit MRs to < 8GB for T4/T5 devices") > Signed-off-by: Potnuri Bharat Teja > Signed-off-by: Showrya M N [Severity: Low] Does the second Fixes tag accurately identify the introducing commit? At 2550a88d956f ("RDMA/cxgb4: Limit MRs to < 8GB for T4/T5 devices"), c4iw_map_mr_sg() did not exist yet (added in 8376b86de7d3 ("iw_cxgb4: Support the new memory registration API")), and wr.fast_reg.length was a u32, so fast-reg MRs could never reach 8GB. Fast-reg MRs could only reach 4GB or 8GB once ib_mr.length became u64 in edd31551148c ("IB: Correct MR length field to be 64-bit"), which is already cited by the first Fixes tag. Dropping the second Fixes tag avoids misleading automated stable backporting. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261203222608.1290= 7-1-showrya@chelsio.com?part=3D1