From: Selvin Xavier <selvin.xavier@broadcom.com>
To: leon@kernel.org, jgg@ziepe.ca
Cc: linux-rdma@vger.kernel.org, andrew.gospodarek@broadcom.com,
kalesh-anakkur.purayil@broadcom.com,
sriharsha.basavapatna@broadcom.com, alhouseenyousef@gmail.com,
Selvin Xavier <selvin.xavier@broadcom.com>
Subject: [PATCH for-next v4 0/4] RDMA/bnxt_re: Update the toggle page handling of CQ and SRQ
Date: Tue, 21 Jul 2026 04:54:36 -0700 [thread overview]
Message-ID: <20260721115440.24021-1-selvin.xavier@broadcom.com> (raw)
Based on the suggestion from Jason (
https://patchwork.kernel.org/project/linux-rdma/patch/20260615224751.232802-5-selvin.xavier@broadcom.com/)
, adding the uverb object to retrieve the CQ an SRQ structures while getting the
toggle mem. To work with older rdma-core, retain the existing code with
modification.
The rdma-core pull request is here: https://github.com/linux-rdma/rdma-core/pull/1761
Please review and apply the series.
Thanks,
Selvin Xavier
v3 -> v4:
- Fix a NULL pointer possibility by adding a check for res_uobj->object
- Locking changes in patch1 based on Leon's comment
- The kref of the mmap entry (patch 3 of the previous series) is folded
into the patch 2 of this series that fixes the lifetime of the toggle
pages.
- Adds a clearing of the MAYWRITE option, so that read-only mapping
can't later be upgraded.
- v3: https://lore.kernel.org/linux-rdma/20260713135830.1934471-1-selvin.xavier@broadcom.com/
v2 -> v3:
- Patch2 fixes toggle-page lifetime by making the rdma_user_mmap_entry
the sole owner of the page
- Patch 3 adds a reference to the uobject in the legacy path to avoid
the usage of the page va after the resource destroy.
- v2: https://lore.kernel.org/linux-rdma/20260624223927.521882-1-selvin.xavier@broadcom.com/
v1->v2 :
- Fix the error cleanup for SRQ and CQ create paths
- Fix a synchronization issue for the legacy path which can cause a
UAF
- v1: https://lore.kernel.org/linux-rdma/20260622100528.132463-1-selvin.xavier@broadcom.com/
Selvin Xavier (4):
RDMA/bnxt_re: Replace per-device hash tables with per-context XArrays
RDMA/bnxt_re: Defer toggle page free to rdma_user_mmap_entry teardown
RDMA/bnxt_re: Fix toggle page UAF in GET_TOGGLE_MEM with mmap entry
refcount
RDMA/bnxt_re: Add uverbs object handle path for CQ/SRQ toggle page
Selvin Xavier (4):
RDMA/bnxt_re: Replace per-device hash tables with per-context XArrays
RDMA/bnxt_re: Defer toggle page free to rdma_user_mmap_entry teardown
RDMA/bnxt_re: Add uverbs object handle path for CQ/SRQ toggle page
RDMA/bnxt_re: Clear VM_MAYWRITE on DBR/toggle page mmap
drivers/infiniband/hw/bnxt_re/bnxt_re.h | 6 -
drivers/infiniband/hw/bnxt_re/ib_verbs.c | 125 +++++++++++++---
drivers/infiniband/hw/bnxt_re/ib_verbs.h | 8 +-
drivers/infiniband/hw/bnxt_re/main.c | 4 -
drivers/infiniband/hw/bnxt_re/uapi.c | 183 +++++++++++++++--------
include/uapi/rdma/bnxt_re-abi.h | 4 +
6 files changed, 233 insertions(+), 97 deletions(-)
--
2.39.3
next reply other threads:[~2026-07-21 6:32 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-21 11:54 Selvin Xavier [this message]
2026-07-21 11:54 ` [PATCH for-next v4 1/4] RDMA/bnxt_re: Replace per-device hash tables with per-context XArrays Selvin Xavier
2026-07-21 11:54 ` [PATCH for-next v4 2/4] RDMA/bnxt_re: Defer toggle page free to rdma_user_mmap_entry teardown Selvin Xavier
2026-07-21 11:54 ` [PATCH for-next v4 3/4] RDMA/bnxt_re: Add uverbs object handle path for CQ/SRQ toggle page Selvin Xavier
2026-07-27 6:21 ` Leon Romanovsky
2026-07-27 6:56 ` Selvin Xavier
2026-07-27 9:07 ` Leon Romanovsky
2026-07-27 9:09 ` Selvin Xavier
2026-07-21 11:54 ` [PATCH for-next v4 4/4] RDMA/bnxt_re: Clear VM_MAYWRITE on DBR/toggle page mmap Selvin Xavier
2026-07-22 16:20 ` (subset) [PATCH for-next v4 0/4] RDMA/bnxt_re: Update the toggle page handling of CQ and SRQ Leon Romanovsky
2026-07-27 9:52 ` Leon Romanovsky
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=20260721115440.24021-1-selvin.xavier@broadcom.com \
--to=selvin.xavier@broadcom.com \
--cc=alhouseenyousef@gmail.com \
--cc=andrew.gospodarek@broadcom.com \
--cc=jgg@ziepe.ca \
--cc=kalesh-anakkur.purayil@broadcom.com \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=sriharsha.basavapatna@broadcom.com \
/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.