From: sashiko-bot@kernel.org
To: "Cygnus Qiu" <eritque-arcus@ikuyo.dev>
Cc: linux-rdma@vger.kernel.org
Subject: Re: [PATCH v3] RDMA/rxe: reject MRs whose iova range wraps, keep ODP lengths unsigned
Date: Wed, 25 Nov 2026 20:52:24 +0000 [thread overview]
Message-ID: <sashiko-outbox-234150@kernel.org> (raw)
In-Reply-To: <20261125204024.517458-1-eritque-arcus@ikuyo.dev>
> rxe_check_pagefault() bounds the ODP page index against the umem inside
> a loop over the pages of the access. When the access ends at 2^64,
> iova + length is 0 and the loop does not run, so neither that bound nor
> the HMM_PFN_VALID and HMM_PFN_WRITE checks apply. mr_check_range()
> admits such an access when the MR's own iova range ends at 2^64, which
> rxe_reg_user_mr() accepts. __rxe_odp_mr_copy() and the atomic write and
> flush helpers then index map.pfn_list[] with (iova - ib_umem_start()) >>
> page_shift, which the registrant controls, and the page derived from the
> entry past pfn_list[] is copied to or from the peer.
>
> rxe_check_pagefault() also keeps the index in an int, so an index of
> 2^32 or more passes the bound truncated, while the atomic write and
> flush helpers use all of it.
>
> Reject an MR whose iova + length overflows u64 in rxe_reg_user_mr();
> [ ... ]
> rdma-core v65.0 tests, ODP included, pass with and without this patch.
>
> Fixes: 2fae67ab63db ("RDMA/rxe: Add support for Send/Recv/Write/Read with ODP")
> Cc: stable@vger.kernel.org # 6.15.x: 7797bbb0e86f: RDMA/rxe: bound the ODP page index against the umem in rxe_check_pagefault()
> Signed-off-by: Cygnus Qiu <eritque-arcus@ikuyo.dev>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261125204024.517458-1-eritque-arcus@ikuyo.dev?part=1
prev parent reply other threads:[~2026-11-25 20:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-25 20:40 [PATCH v3] RDMA/rxe: reject MRs whose iova range wraps, keep ODP lengths unsigned Cygnus Qiu
2026-11-25 20:52 ` sashiko-bot [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=sashiko-outbox-234150@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=eritque-arcus@ikuyo.dev \
--cc=linux-rdma@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox