dax/hmem: Add tests for the dax_hmem takeover capability
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest9 patches 36 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/9 | cxl/region: Fix use-after-free from auto assembly failuredrivers/ drivers/ | +57 | 6 replies | |
| 2/9 | dax/cxl: Fix HMEM dependenciesdrivers/ | +4 | 3 replies | |
| 3/9 | cxl/region: Limit visibility of cxl_region_contains_resource()drivers/ drivers/ drivers/ +1 more | +7 | 3 replies | |
| 4/9 | cxl/region: Constify cxl_region_resource_contains()drivers/ drivers/ drivers/ | +9 | 3 replies | |
| 5/9 | dax/hmem: Reduce visibility of dax_cxl coordination symbolsdrivers/ drivers/ | +2 | 3 replies | |
| 6/9 | dax/hmem: Fix singleton confusion between dax_hmem_work and hmem devicesdrivers/ drivers/ drivers/ | +85 | 3 replies | |
| 7/9 | dax/hmem: Parent dax_hmem devicesdrivers/ | +1 | 3 replies | |
| 8/9 | tools/testing/cxl: Simulate auto-assembly failuretools/ | +9 | 3 replies | |
| 9/9 | tools/testing/cxl: Test dax_hmem takeover of CXL regionstools/ tools/ tools/ +4 more | +173 | 5 replies |
Reviews trailers per patch
All 9 patches have a Reviewed-by or Acked-by.
| Patch | Dave Jiang | Alison Schofield | Ira Weiny |
|---|---|---|---|
| 1/9 | R-b | R-b | R-b |
| 2/9 | R-b | R-b | R-b |
| 3/9 | R-b | R-b | R-b |
| 4/9 | R-b | R-b | R-b |
| 5/9 | R-b | R-b | R-b |
| 6/9 | R-b | R-b | R-b |
| 7/9 | R-b | R-b | R-b |
| 8/9 | R-b | R-b | R-b |
| 9/9 | R-b | T-b | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.
Cover letter [PATCH 0/9] dax/hmem: Add tests for the dax_hmem takeover capability
Given all the cross subsystem dependencies needed to make this solution work, it needs to have a unit test to keep it functional.
On the path to writing that, several fixes fell out, but not to Smita's code, to mine. One use-after-free has been there since the original automatic region assembly code.
Here is a preview of the core of the test I will submit to the cxl-cli project:
---
modprobe cxl_mock_mem && modprobe cxl_test hmem_test=1
dax=$(find_dax_cxl)
[[ "$dax" == "" ]] && err $LINENO
dax=$(find_dax_hmem)
[[ "$dax" != "" ]] && err $LINENO
unload
modprobe cxl_mock_mem && modprobe cxl_test fail_autoassemble hmem_test=1
dax=$(find_dax_cxl)
[[ "$dax" != "" ]] && err $LINENO
dax=$(find_dax_hmem)
[[ "$dax" == "" ]] && err $LINENO
unload
---
This builds on Smita's series [1] pushed out to for-7.1/dax-hmem in cxl.git [2].
[1]: http://lore.kernel.org/[email protected]
[2]: https://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl.git/log/?h=for-7.1/dax-hmem
Dan Williams (9):
cxl/region: Fix use-after-free from auto assembly failure dax/cxl: Fix HMEM dependencies
cxl/region: Limit visibility of cxl_region_contains_resource() cxl/region: Constify cxl_region_resource_contains() dax/hmem: Reduce visibility of dax_cxl coordination symbols dax/hmem: Fix singleton confusion between dax_hmem_work and hmem
devices
dax/hmem: Parent dax_hmem devices
tools/testing/cxl: Simulate auto-assembly failure tools/testing/cxl: Test dax_hmem takeover of CXL regions
drivers/dax/Kconfig | 6 +- drivers/cxl/cxl.h | 11 ++- drivers/dax/bus.h | 15 +++- include/cxl/cxl.h | 15 ---- tools/testing/cxl/test/mock.h | 8 ++ drivers/cxl/core/region.c | 68 +++++++++++++++-- drivers/dax/hmem/device.c | 28 ++++--- drivers/dax/hmem/hmem.c | 115 +++++++++++++++-------------- tools/testing/cxl/test/cxl.c | 66 +++++++++++++++++ tools/testing/cxl/test/hmem_test.c | 47 ++++++++++++ tools/testing/cxl/test/mem.c | 3 + tools/testing/cxl/test/mock.c | 50 +++++++++++++ tools/testing/cxl/Kbuild | 7 ++ tools/testing/cxl/test/Kbuild | 1 + 14 files changed, 344 insertions(+), 96 deletions(-) delete mode 100644 include/cxl/cxl.h create mode 100644 tools/testing/cxl/test/hmem_test.c
base-commit: 51d2fa02c0e4b3b23c4484f2af9b6d65c35471e8
Signature · 1 line
2.53.0