From: sashiko-bot@kernel.org
To: "Honggang LI" <honggangli@163.com>
Cc: linux-rdma@vger.kernel.org
Subject: Re: [PATCH v3] RDMA/rxe: Fix out-of-range unsigned-to-signed conversion for RDMA message in 2GiB size
Date: Sat, 03 Oct 2026 01:32:58 +0000 [thread overview]
Message-ID: <20261003013305.17D101F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20261002142250.657151-1-honggangli@163.com>
> When RDMA READ request for 2GiB in single WR, res->read.resid is u32
> 0x80000000, which is INT_MIN (-2147483648).
>
> payload = min_t(int, res->read.resid, mtu);
>
> The `min_t` function will return -2147483648 for payload. The wrong
> size is propagated through call chain, `read_reply` -> `prepare_ack_packet`
> -> `rxe_init_packet` -> `alloc_skb` . `alloc_skb` failed because of
> invalid size. The passive side failed to emit response packet for RDMA
> READ request.
>
> After fixed it, the active side of RDMA READ failed with error code
> "IB_WC_LOC_PROT_ERR". When RDMA_READ_RESPONSE_FIRST packet recived by
> the active side, `do_read` call `copy_data`. dma->resid is u32 0x80000000.
>
> int resid = dma->resid;
>
> This conversion set resid to -2147483648. `copy_data` abort as length
> greater than resid.
>
> RDMA SEND and WRITE 2GiB message works too, after fixed these two bugs.
>
> Fixes: 8700e3e7c485 ("Soft RoCE driver")
> Signed-off-by: Honggang LI <honggangli@163.com>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261002142250.657151-1-honggangli@163.com?part=1
prev parent reply other threads:[~2026-10-03 1:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-02 14:22 [PATCH v3] RDMA/rxe: Fix out-of-range unsigned-to-signed conversion for RDMA message in 2GiB size Honggang LI
2026-10-03 1:32 ` 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=20261003013305.17D101F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=honggangli@163.com \
--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