Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.222.180 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795960389; b=JUog/uWEPir82DhXGVoVYV9MVbB6HvPmr5mJobI66RXhM+mh4VqJSUhdRwI78v7H52kF 6rYc5nGy9w0ztoKXMXD+DRZed4JD1f8Z+ZFI9VDKo1YpVvqN07l+9rdOlJnlzN+v8b2cG MexSp39/cjisgvPTII1j2H1K4r9K+911Mc2SQUyVOohoth017kGfgkAK6w9p8sHTFKMC3 N0G8YH2oNvtIxlrE/qvhrT0lvhJcF+Tp5/nMidWUZA6BrWGj8g1aGVxPe/0bWgMoOi1p6 wKw7LV27dUl/KaM9v/ZNtHktQFltKTuqnDS1dSIFOaTSef0BhF0QPTl0vDIgZOmvR+g== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795960389; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:To:Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:References: MIME-Version:Content-Transfer-Encoding; bh=xvRpy3CSF9S9Rmg1Z5lfZhXszwovj/O2adP3Duc+2Bc=; b=Qp21ikL8Rs9aS+SiLyXhL+Ubagg2WGtlu6geS5Efw1wr0U1wxlMZKraVR1ZstMxYqkfZ I38w/DSDJ/dNoxjK35ttIe5OqHQEYwzRczy2f3ny2nekIevNlkugwFpsUj0vbsfns+kPG ar+3M93gRdNz2Thuro/DW3+rNCldySBaIMAf8fmP5HnuFFn4+8elQic1iFhfal56CjT0p lCRwNQTiQWmXiBURZ9hv8u0N2tNtyOALUmg52hW2AG/s2HZaJ5cmf1lDsNTN+NtKMn1Tn MYISLhCp2goFUhTOy2mGQypWg5oyTdVMXU42KMS2KcWacg44lvuwwL4NmvqSdFTLj4A== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none header.from=stellman-greene.com; spf=none smtp.mailfrom=stellman-greene.com; dkim=pass header.d=stellman-greene-com.20260707.gappssmtp.com header.i=@stellman-greene-com.20260707.gappssmtp.com header.a=rsa-sha256 header.s=20260707 header.b=r3AS91aM; arc=none smtp.remote-ip=209.85.222.180 Received: from mail-qk1-f180.google.com (mail-qk1-f180.google.com [209.85.222.180]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 44688606A327 for ; Sun, 29 Nov 2026 13:53:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 44688606A327 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=stellman-greene.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=stellman-greene.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=stellman-greene-com.20260707.gappssmtp.com header.i=@stellman-greene-com.20260707.gappssmtp.com header.a=rsa-sha256 header.s=20260707 header.b=r3AS91aM Received: by mail-qk1-f180.google.com with SMTP id af79cd13be357-9495d543c42so945998285a.3 for ; Sun, 29 Nov 2026 05:53:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stellman-greene-com.20260707.gappssmtp.com; s=20260707; t=1795960388; x=1796565188; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=xvRpy3CSF9S9Rmg1Z5lfZhXszwovj/O2adP3Duc+2Bc=; b=r3AS91aM6bU5ZvlyEAjtiGiKIAQMggFvRxPh+ebvzZG8tPiZMIqq07bgECncf/5MaT Vb6zMrRf0JsKX2LFUVz219Aei/wiYjVzVZBXZdrpcnU04OSi8n6Yfqq5dNhoJvYqaLk6 0q//+g/kGo9o7mIkjWpl1K/pdOsqiUn1KQMpg5LGSiPmuSramAgBFdLm8WCTQg+cfZSM VogpgCsBtayvIJNXtc2oZVU2sW7xyaI8MmBfUK/oHXm90EFrJBFJRRAqBip3ac9OvLQD hdgGAJ8G7qKxklkDjO5f9dF+tg0OrYGWrOlS181Mag7Fb2ekY5sDQ8WtJ6JTCvtW4Rnf Hr3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795960388; x=1796565188; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=xvRpy3CSF9S9Rmg1Z5lfZhXszwovj/O2adP3Duc+2Bc=; b=SyWty9M4cFTtK03bTQ4dirjrVj6xraeCd3ONmLOdoUYMKNMzImSYlMS98BzOuyd9dn U6qGsvaPNSMUB3GbIS8A847N3DMvKDer5Hbpmq0pnywejL5Qk0VDRGU6BOrX6bxGnCd8 T+tgHt6V/8rie8T6bojLdhQt9tcts14yQhtb4oHygCmMq5zUrXTIobcuQj18hQFjR60G Q4j35jDdk0OUHvpFyjBl9KKq4/vUkUDfamaACLu1ZdmtqWiiPfvT0rZ4pbWgo7lHqyJc O5IybrirtaJdO8CPjT4Bz9+BGiOcvSOyX2tIl/hLi+qM0fKOAPAV9Uyztvh7NmPwu6a+ bN0g== X-Forwarded-Encrypted: i=1; AL+hErEpGUDOsis6QvEoYm3NyKLmYq5kP6bdb5ceL8QgClUy6ts3urjnP9jsfUHIwe4Jxj7NN0dbECp19icz@vger.kernel.org X-Gm-Message-State: APuU4Z9Ei8xlyCSWDVXL+41FTmVr/wBMxfdvnuaTVJ778e4LzfTSx7ni UIUU1N5gmnJm9u6GT1VVQVTRbHgOYMVCZUGW14kkwPlPZSO88IOWZbQcjSTv12KqVHk= X-Gm-Gg: AZFdTZfewH9w2NtEw8N4Eyic/O5AblQ8PNJwaNlNjY6b70rLw+AZWu4yMT+6t0ICWCa oNSB9Wpr12F+ERXonqbTx0YGDBDATOHvqrPMBbr/PMqS6hm72GviIdEoha72/GT+pxdzpxgUj35 vpDGk0s4wh4HA9DBTMui3FfkayQtE1g0cElNEw5F3jxpzbjFFIna8r3+E7q5pXWWkAyzIVDHqea wqnB3Y8rch/jgAOaG14YGnmn25UFmntHVikmIA0nwCyK3yKGngHylnN4NbAsAIoq1uqKVY6cEw6 UD2lZ1iYZqtLZLVeeBJZy6nTR8TLO34jrldpEG7PQc70qA/IHqzOj4SQn5zcDhTTujSiUJW7f3v 2H2OCFLEOCoSpaIv3mClfWPTrshnUHHYHRMttIH2/TCmwPC/mXNhtVrJXfKC8QXGPyqEXYw08mf stLEW5MQounsoLWOSI6v60+Vnp3W7HUHt7lwbbncRAxGiKTTy+1ct7EBNxkyWLbqMgNR7xS8Bo+ 1ALUUIN2Oy/fiVdlBDTB7DVf//wsXEwP6Isi5OcK4AgSwso/BswUBQ8sOtlzqqKG8AhcxSfsnVD lZI0hBOR1KMX/aSOS7FcYnYP96yjdvxsYvk9pOQj6FFAN8stPO7w8S2ofh+PjgaR01r+CYYn0qQ 8dA== X-Received: by 2002:a05:620a:130f:b0:949:7b40:5678 with SMTP id af79cd13be357-949ba9e19a8mr5518267285a.53.1795960388292; Sun, 29 Nov 2026 05:53:08 -0800 (PST) Received: from Mac.mynetworksettings.com ([2600:4041:5c28:200:3c29:a645:a023:b4a7]) by smtp.gmail.com with ESMTPSA id af79cd13be357-949bb34ae74sm2289127785a.8.2026.11.29.05.53.07 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 29 Nov 2026 05:53:07 -0800 (PST) From: Andrew Stellman To: Zhu Yanjun , Zhu Yanjun Cc: Li Zhijian , Jason Gunthorpe , Leon Romanovsky , linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH rdma-rc] RDMA/rxe: Bound MR copy and flush chunks to MR pages Date: Sun, 29 Nov 2026 08:53:06 -0500 Message-ID: <20261129135306.80838-1-bugs@stellman-greene.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <77aba02e-64a7-4987-80f8-46c5301ac106@linux.dev> References: <20261128140840.59003-1-bugs@stellman-greene.com> <20261129001904.79077-1-bugs@stellman-greene.com> <77aba02e-64a7-4987-80f8-46c5301ac106@linux.dev> X-Mailing-List: linux-rdma@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit On Sat, Nov 28, 2026 at 04:36:17PM -0800, Zhu Yanjun wrote: > Do you make tests in your local host? Or just use AI to make static > analysis? My last reply was from reading the source. After your question I ran a check in an arm64 QEMU guest on mainline 4f069ab1ec24 plus a test-only patch (logging and a root-only hook), with 64 KiB pages, KASAN and rxe: - Five user MRs registered with ibv_reg_mr, including buffers that were 4 KiB aligned but not 64 KiB aligned. A pr_info at the top of rxe_mr_fill_pages_from_sgt() logged mr_page_size=65536 and PAGE_SIZE=65536 for all five, and the WARN_ON didn't fire. - A root-only test hook called rxe_mr_init_fast() and then rxe_map_mr_sg() directly, with the MR page size set to 4 KiB. rxe_mr_fill_pages_from_sgt() wasn't called. The v1 patch was tested on mainline 7cd8495c0f16 in an arm64 QEMU guest with 64 KiB pages and KASAN, using a root-only test hook that calls rxe_mr_copy() directly. A read and a write across a 4 KiB MR-page boundary failed without the patch, passed with it, and failed again with it reverted. The flush path was built but not run. I can send the test-only probe patch and the user program (user-mr.c) if they'd help.