Re: [PATCH rdma-rc] RDMA/rxe: Bound MR copy and flush chunks to MR pages

From: Andrew Stellman

Date: Sun Nov 29 2026 - 08:53:11 EST


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.