From: sashiko-bot@kernel.org
To: "Edward Srouji" <edwards@nvidia.com>
Cc: linux-rdma@vger.kernel.org
Subject: Re: [PATCH rdma-next v2 2/3] RDMA/mlx5: Fix DEVX UMEM mailbox size truncation
Date: Wed, 11 Nov 2026 14:55:31 +0000 [thread overview]
Message-ID: <sashiko-outbox-209202@kernel.org> (raw)
In-Reply-To: <20261111-devx-umem-mailbox-overflow-v2-2-1e7ca8237b58@nvidia.com>
> From: Uri Dar <udar@nvidia.com>
>
> devx_umem_reg_cmd_alloc() stores the CREATE_UMEM mailbox size, a header
> plus 8 bytes per MTT, in the u32 cmd->inlen. The number of MTTs is
> derived from the user-supplied length and pgsz_bitmap, so a UMEM of about
> 2TB registered with 4KB pages wraps the size, the mailbox is
> under-allocated and mlx5_ib_populate_pas() writes past its end.
>
> Compute the size with the saturating size_mul() and size_add() helpers
> and reject a UMEM whose mailbox exceeds INT_MAX, the largest in_size
> mlx5_cmd_exec() accepts.
>
> Mailbox sizes within 512 bytes of INT_MAX still overflow the block count
> in mlx5_calc_cmd_blocks(), but the command then fails with -ENOMEM
> before reaching firmware. This predates the change.
>
> Fixes: aeae94579caf ("IB/mlx5: Add DEVX support for memory registration")
> Cc: stable@vger.kernel.org
> Signed-off-by: Uri Dar <udar@nvidia.com>
> Reviewed-by: Michael Gur <michaelgur@nvidia.com>
> Signed-off-by: Edward Srouji <edwards@nvidia.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261111-devx-umem-mailbox-overflow-v2-0-1e7ca8237b58@nvidia.com?part=2
next prev parent reply other threads:[~2026-11-11 14:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-11 13:57 [PATCH rdma-next v2 0/3] RDMA: Fix DEVX UMEM mailbox size overflow Edward Srouji
2026-11-11 13:57 ` [PATCH rdma-next v2 1/3] RDMA/mlx5: Respect pgsz_bitmap when reducing the DEVX UMEM page size Edward Srouji
2026-11-11 14:48 ` sashiko-bot
2026-11-11 13:57 ` [PATCH rdma-next v2 2/3] RDMA/mlx5: Fix DEVX UMEM mailbox size truncation Edward Srouji
2026-11-11 14:55 ` sashiko-bot [this message]
2026-11-11 13:57 ` [PATCH rdma-next v2 3/3] RDMA/core: Don't warn on oversized bundle allocations Edward Srouji
2026-11-11 14:43 ` sashiko-bot
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-209202@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=edwards@nvidia.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.