Linux CXL
 help / color / mirror / Atom feed
* [ndctl PATCH 0/4] libdaxctl: Fix multi-range memory block handling
@ 2026-10-22 19:56 Alison Schofield
  2026-10-22 19:56 ` [ndctl PATCH 1/4] libdaxctl: handle mapping initialization failures Alison Schofield
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Alison Schofield @ 2026-10-22 19:56 UTC (permalink / raw)
  To: nvdimm, Gregory Price; +Cc: Alison Schofield, linux-cxl

[ Gregory: Hoping you can help w reviews here ]

Review and testing of Gregory's dax kmem atomic whole-device hotplug
series[1] exposed an existing libdaxctl bug when handling DAX devices with
multiple physical address ranges.

libdaxctl identifies a device's memory blocks using a single contiguous
address window, even when the device has separate ranges with gaps between
them. This can exclude blocks belonging to the device and include blocks
belonging to another device in the gaps. As a result, daxctl can report
incorrect memory block counts and potentially online or offline another
device's memory.

Patches 1-2 address mapping reliability issues discovered while fixing
the memory block ownership checks.

Patch 3 corrects the memory block ownership checks.

Patch 4 adds regression coverage using a two-range DAX device.

[1] https://lore.kernel.org/linux-cxl/20261016214248.443247-1-gourry@gourry.net/

Alison Schofield (4):
  libdaxctl: handle mapping initialization failures
  libdaxctl: tie mapping cache lifetime to the device
  libdaxctl: match memory blocks against each dax device mapping
  test/daxctl-create.sh: count memory blocks across dax mappings

 daxctl/lib/libdaxctl.c | 93 ++++++++++++++++++++++++++++++++++--------
 test/daxctl-create.sh  | 58 ++++++++++++++++++++++++++
 2 files changed, 135 insertions(+), 16 deletions(-)

-- 
2.37.3


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2026-10-28 20:12 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-22 19:56 [ndctl PATCH 0/4] libdaxctl: Fix multi-range memory block handling Alison Schofield
2026-10-22 19:56 ` [ndctl PATCH 1/4] libdaxctl: handle mapping initialization failures Alison Schofield
2026-10-28 15:48   ` Gregory Price
2026-10-22 19:56 ` [ndctl PATCH 2/4] libdaxctl: tie mapping cache lifetime to the device Alison Schofield
2026-10-28 20:12   ` Gregory Price
2026-10-22 19:56 ` [ndctl PATCH 3/4] libdaxctl: match memory blocks against each dax device mapping Alison Schofield
2026-10-28 13:55   ` Gregory Price
2026-10-22 19:56 ` [ndctl PATCH 4/4] test/daxctl-create.sh: count memory blocks across dax mappings Alison Schofield
2026-10-28 19:45   ` Gregory Price
2026-10-23 17:37 ` [ndctl PATCH 0/4] libdaxctl: Fix multi-range memory block handling Gregory Price (Meta)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox