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=1796030323; b=mCCdxUSrm0xI5UXftF1iTqu+IeKhSRZco+G8WD5A2Dr6kcCM7vtdMl+wbep/tQswp+Es pjhyeODqLdJjGgyoyDzWoxQGyyM7Rqifaf5VabEnumEaZ7ENvpNHKmdyZx9s9/bNxK59a NTrr2F0ZFFRP5As4rs13lDdLWW+Ysjzwtt266mJcBkibpIV2tHHT+Sk0HbgnwrpvUJvK1 nIuRhxbMP/hY+08PpWsOME/ChExII/cfHcliMhQEfHOIvZJOM5euDHUu9XTBV35sTIls1 ABFP5+OeMljVUzc3m39LPzZwANFgIRoGlh8ovkzbuRtnndonyzyqWcyPciaE+QMu1mw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796030323; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=a1R56KPTQX5JagTbs9qRjEWWvtdsUk1/a1h5Dd0D8CE=; b=xRx8KicOihjL/wLIjlUMc7oZml2DQaWVB0c4SVMVomqC8tcMhhd0oMyXG3dv8RM7Z6F5 Todg/Feqz30qOIM8db+AoUR1cqyHNQMIGgIo8bEXJYQW+is55MxZhbAA6c/UEbULKIAUO rD0xHTvD8WSfGnNrAaWCBb/kynqPDLdKsVrcWUKpvHF5vkvHpQ6kINY52lX5RnMAUdI/6 uvuWoAGuYWkOVpeFCFT8FmyITgrw4WmaKUcSulJV68GOSHzsrE0R8OoXIW1+aaGYReWNM QT4XUIvVZ5sXZBY5wTihU522l6A5R4AKEPmHvRH5Zps/nLPszrFpPNZDvjEGLEpI7yg== 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=kgmqvSyQ; 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 0402A606A31C; Mon, 30 Nov 2026 09:18:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=kgmqvSyQ Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2ECFD1F00897; Mon, 30 Nov 2026 09:18:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796030322; bh=a1R56KPTQX5JagTbs9qRjEWWvtdsUk1/a1h5Dd0D8CE=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=kgmqvSyQ1QePIRdFwYi9F39+2SS/Ha+/9SYplKivEYB9Ksw8TdgU3NHzc4cjOXAey gDCGkcJJ5SJhkVIm5tTcXjySLlfA/9o7vL31tNjAW0bD1TU7bCwnDNpGK5/KhUQxdN q+NrAcuHdp3f8cK1IgAUGUgUURJZhjFzBhLbZHueYs/IbK/vm5+s264KR5Gc55AnN8 PyLQsxvcAQxsEqH6jySKrYChe2Poq6zPDG21yqp22+Vw2GWyQAfyDBTjsGORkgc70o bJ/apG0dD+iJubveJMt1tllIj30XvC/C8fptWs13lVpsdyrrRQFW6KFriUdSGJeANR 136PPqqZ2luEA== Date: Mon, 30 Nov 2026 11:18:38 +0200 From: Leon Romanovsky To: Edward Srouji Cc: Jason Gunthorpe , linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, Yishai Hadas Subject: Re: [PATCH rdma-rc] RDMA/mlx5: Don't WARN on a user iova that can't be mapped Message-ID: <20261130091838.GA31440@unreal> References: <20261129-mlx5-no-warn-page-size-v1-1-02b15ebaea8c@nvidia.com> <20261129141957.GN774860@unreal> <22927f31-0733-4909-9794-b3db9e2fe912@nvidia.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <22927f31-0733-4909-9794-b3db9e2fe912@nvidia.com> On Sun, Nov 29, 2026 at 05:22:57PM +0200, Edward Srouji wrote: > > > On 11/29/2026 4:19 PM, Leon Romanovsky wrote: > > External email: Use caution opening links or attachments > > > > > > On Sun, Nov 29, 2026 at 01:54:13PM +0200, Edward Srouji wrote: > > > From: Yishai Hadas > > > > > > alloc_cacheable_mr() and can_use_umr_rereg_pas() warn when no page size > > > fits the MR. The WARNs rely on ib_umem_find_best_pgsz() never returning > > > 0 for drivers that support PAGE_SIZE, as its kdoc promises. > > > > > > commit 09ea6837a043 ("RDMA/umem: Be careful about boundary > > > conditions in ib_umem_find_best_pgsz()") broke that promise, the > > > function now returns 0 when iova + length overflows. The iova is > > > provided by the user on MR registration and rereg, so any user can > > > trigger the WARN and panic a system running with panic_on_warn. > > > > > > Drop the WARN in both places, and handle it as any other bad input. > > > > > > Fixes: 09ea6837a043 ("RDMA/umem: Be careful about boundary conditions in ib_umem_find_best_pgsz()") > > > Signed-off-by: Yishai Hadas > > > Signed-off-by: Edward Srouji > > > --- > > > drivers/infiniband/hw/mlx5/mr.c | 4 ++-- > > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > This does not apply. Please don't send multiple patch series in parallel unless > > each series can be applied independently. > > I'm aware of it, and was tracking the SD-prep[1] series, I was planning to > rebase other series/patches accordingly whichever is first accepted. > Since SD-prep series touches many major mlx5_ib files, it would have blocked > a lot of mlx5 patches if I've waited on it. > > This patch applies cleanly on wip/leon-for-rc though, and trivially > conflicts with *-for-next. > Do you want me to rebase on *-for-next and sent it as rdma-next? Yes, please. Thanks > > [1] https://lore.kernel.org/linux-rdma/179595548593.1476292.12697977062439372489.b4-ty@kernel.org/ > > > > > > Thanks > >