RDMA/irdma: Adopt robust udata
Status from this message: Applied, thanks!
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
Earlier versions · 1
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v1 | 5 patches | 2 replies | Superseded |
Changes in v4 from the cover letter
* Rebase to latest for-next and added prerequisite-patch-id. Changes in v3:
* Add ib_no_udata_io helper to more easily handle the common case of no input/no output ops.
* Fixed regression in create_qp failure path caught by sashiko.
* Rebased on top of previous posted irdma fixes.
* Fixed an additional latent legacy compat bug in create_qp.
* Added missing response buffer clearing for reg/rereg_user_mr. Changes in v2:
* Fixed Sashiko findings:
- Moved ib_respond_empty_udata to beginning of most methods to close gaps where it could previously return 0 without calling ib_respond_empty_udata. This also fixes issues where the ib_respond_empty_udata call itself could fail, which may leave resources in an inconsistent state (kernel believes object is alive, but driver resources have been cleaned up).
- Moved input validation to beginning of modify_qp methods to close gaps where the op could be invoked with udata but without input checking.
- Fixed a QPN leak that could occur during QP create by moving input validation earlier.
Patches in v4 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | RDMA/irdma: Add checks for no udatadrivers/ | +62 | 0 replies | |
| 2/6 | RDMA/irdma: Clear udata response buffers where necessarydrivers/ | +21 | 0 replies | |
| 3/6 | RDMA/irdma: Use robust input copy helpersdrivers/ | +34 | 0 replies | |
| 4/6 | RDMA/irdma: Use robust udata helper for QP creationdrivers/ include/ | +23 | 0 replies | |
| 5/6 | RDMA/irdma: Fix legacy i40iw compat check in create_qpdrivers/ | +6 | 0 replies | |
| 6/6 | RDMA/irdma: Enable uverbs_robust_udata compliance flagdrivers/ | +1 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.
Cover letter [PATCH rdma-next v4 0/6] RDMA/irdma: Adopt robust udata
This series brings irdma up to uverbs_robust_udata compliance.
The driver has been audited to confirm that:
1. Methods which do not accept udata input perform an explicit check for no (or zero value) input.
2. Methods which do accept input perform the correct validation to ensure that additional udata beyond the kernel's current ABI definition is zero, and to enforce the required minimum length.
3. Methods which do not return udata responses use the proper helper.
The irdma driver is backwards compatible with the legacy i40iw provider, so special care was taken to avoid breaking any legacy binaries, as there were some small differences in the ABI/semantics.
This has passed the rdma-unit-test suite using the normal irdma provider from upstream rdma-core.
Changes in v4:
* Rebase to latest for-next and added prerequisite-patch-id. Changes in v3:
* Add ib_no_udata_io helper to more easily handle the common case of no input/no output ops.
* Fixed regression in create_qp failure path caught by sashiko.
* Rebased on top of previous posted irdma fixes.
* Fixed an additional latent legacy compat bug in create_qp.
* Added missing response buffer clearing for reg/rereg_user_mr. Changes in v2:
* Fixed Sashiko findings:
- Moved ib_respond_empty_udata to beginning of most methods to close gaps where it could previously return 0 without calling ib_respond_empty_udata. This also fixes issues where the ib_respond_empty_udata call itself could fail, which may leave resources in an inconsistent state (kernel believes object is alive, but driver resources have been cleaned up).
- Moved input validation to beginning of modify_qp methods to close gaps where the op could be invoked with udata but without input checking.
- Fixed a QPN leak that could occur during QP create by moving input validation earlier.
v3: https://lore.kernel.org/linux-rdma/[email protected]/
v2: https://lore.kernel.org/linux-rdma/[email protected]/
v1: https://lore.kernel.org/linux-rdma/[email protected]/T/#t
Jacob Moroni (6):
RDMA/irdma: Add checks for no udata
RDMA/irdma: Clear udata response buffers where necessary RDMA/irdma: Use robust input copy helpers RDMA/irdma: Use robust udata helper for QP creation RDMA/irdma: Fix legacy i40iw compat check in create_qp RDMA/irdma: Enable uverbs_robust_udata compliance flag
drivers/infiniband/hw/irdma/verbs.c | 216 +++++++++++++++++++--------- include/uapi/rdma/irdma-abi.h | 1 + 2 files changed, 147 insertions(+), 70 deletions(-)
base-commit: 15ae32c4a3551c4c9da457370bdfdd65d171e512
prerequisite-patch-id: 77dd4e2a9a8beba569e8f7c0454db9c13465dd6d
Signature · 1 line
2.55.0.795.g602f6c329a-goog