<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/tools/testing/nvdimm, branch v6.12.80</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2026-01-08T09:14:20+00:00</updated>
<entry>
<title>tools/testing/nvdimm: Use per-DIMM device handle</title>
<updated>2026-01-08T09:14:20+00:00</updated>
<author>
<name>Alison Schofield</name>
<email>alison.schofield@intel.com</email>
</author>
<published>2025-10-31T23:42:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=030b9cdcb542772e9495284c436303321dead4ff'/>
<id>urn:sha1:030b9cdcb542772e9495284c436303321dead4ff</id>
<content type='text'>
commit f59b701b4674f7955170b54c4167c5590f4714eb upstream.

KASAN reports a global-out-of-bounds access when running these nfit
tests: clear.sh, pmem-errors.sh, pfn-meta-errors.sh, btt-errors.sh,
daxdev-errors.sh, and inject-error.sh.

[] BUG: KASAN: global-out-of-bounds in nfit_test_ctl+0x769f/0x7840 [nfit_test]
[] Read of size 4 at addr ffffffffc03ea01c by task ndctl/1215
[] The buggy address belongs to the variable:
[] handle+0x1c/0x1df4 [nfit_test]

nfit_test_search_spa() uses handle[nvdimm-&gt;id] to retrieve a device
handle and triggers a KASAN error when it reads past the end of the
handle array. It should not be indexing the handle array at all.

The correct device handle is stored in per-DIMM test data. Each DIMM
has a struct nfit_mem that embeds a struct acpi_nfit_memdev that
describes the NFIT device handle. Use that device handle here.

Fixes: 10246dc84dfc ("acpi nfit: nfit_test supports translate SPA")
Cc: stable@vger.kernel.org
Signed-off-by: Alison Schofield &lt;alison.schofield@intel.com&gt;
Reviewed-by: Dave Jiang &lt;dave.jiang@intel.com&gt;&gt; ---
Link: https://patch.msgid.link/20251031234227.1303113-1-alison.schofield@intel.com
Signed-off-by: Ira Weiny &lt;ira.weiny@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>nvdimm: ndtest: Return -ENOMEM if devm_kcalloc() fails in ndtest_probe()</title>
<updated>2025-10-15T10:00:23+00:00</updated>
<author>
<name>Guangshuo Li</name>
<email>lgs201920130244@gmail.com</email>
</author>
<published>2025-09-25T06:44:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e4a1e3e88160f7d7a2c33e3db8844073ed6eaf97'/>
<id>urn:sha1:e4a1e3e88160f7d7a2c33e3db8844073ed6eaf97</id>
<content type='text'>
commit a9e6aa994917ee602798bbb03180a194b37865bb upstream.

devm_kcalloc() may fail. ndtest_probe() allocates three DMA address
arrays (dcr_dma, label_dma, dimm_dma) and later unconditionally uses
them in ndtest_nvdimm_init(), which can lead to a NULL pointer
dereference under low-memory conditions.

Check all three allocations and return -ENOMEM if any allocation fails,
jumping to the common error path. Do not emit an extra error message
since the allocator already warns on allocation failure.

Fixes: 9399ab61ad82 ("ndtest: Add dimms to the two buses")
Cc: stable@vger.kernel.org
Signed-off-by: Guangshuo Li &lt;lgs201920130244@gmail.com&gt;
Reviewed-by: Alison Schofield &lt;alison.schofield@intel.com&gt;
Reviewed-by: Ira Weiny &lt;ira.weiny@intel.com&gt;
Reviewed-by: Dave Jiang &lt;dave.jiang@intel.com&gt;
Signed-off-by: Ira Weiny &lt;ira.weiny@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>testing: nvdimm: Add MODULE_DESCRIPTION() macros</title>
<updated>2024-06-17T23:43:08+00:00</updated>
<author>
<name>Ira Weiny</name>
<email>ira.weiny@intel.com</email>
</author>
<published>2024-06-12T04:47:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b0d478e34dbfccb7ce430e20cbe77d4d10593fa3'/>
<id>urn:sha1:b0d478e34dbfccb7ce430e20cbe77d4d10593fa3</id>
<content type='text'>
When building with W=1 the following errors are seen:

WARNING: modpost: missing MODULE_DESCRIPTION() in tools/testing/nvdimm/test/nfit_test.o
WARNING: modpost: missing MODULE_DESCRIPTION() in tools/testing/nvdimm/test/ndtest.o

Add the required MODULE_DESCRIPTION() to the test platform device
drivers.

Suggested-by: Jeff Johnson &lt;quic_jjohnson@quicinc.com&gt;
Reviewed-by: Jeff Johnson &lt;quic_jjohnson@quicinc.com&gt;
Link: https://patch.msgid.link/r/20240611-nvdimm-test-mod-warn-v1-1-4a583be68c17@intel.com
Signed-off-by: Ira Weiny &lt;ira.weiny@intel.com&gt;
</content>
</entry>
<entry>
<title>testing: nvdimm: iomap: add MODULE_DESCRIPTION()</title>
<updated>2024-06-17T23:42:47+00:00</updated>
<author>
<name>Jeff Johnson</name>
<email>quic_jjohnson@quicinc.com</email>
</author>
<published>2024-05-26T15:52:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f48b344a527ad5c09c7d44819287ec51fe5914d3'/>
<id>urn:sha1:f48b344a527ad5c09c7d44819287ec51fe5914d3</id>
<content type='text'>
Fix the 'make W=1' warning:

WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/nvdimm/../../tools/testing/nvdimm/test/iomap.o

Signed-off-by: Jeff Johnson &lt;quic_jjohnson@quicinc.com&gt;
Link: https://patch.msgid.link/r/20240526-md-testing-nvdimm-v1-1-f8b617bb28e1@quicinc.com
Signed-off-by: Ira Weiny &lt;ira.weiny@intel.com&gt;
</content>
</entry>
<entry>
<title>ndtest: Convert to platform remove callback returning void</title>
<updated>2024-04-25T19:37:12+00:00</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2024-03-08T08:51:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=57456adef68db15ab81578d42848bae5b542999a'/>
<id>urn:sha1:57456adef68db15ab81578d42848bae5b542999a</id>
<content type='text'>
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is ignored (apart
from emitting a warning) and this typically results in resource leaks.

To improve here there is a quest to make the remove callback return
void. In the first step of this quest all drivers are converted to
.remove_new(), which already returns void. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Reviewed-by: Dave Jiang &lt;dave.jiang@intel.com&gt;
Reviewed-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
Link: https://lore.kernel.org/r/c04bfc941a9f5d249b049572c1ae122fe551ee5d.1709886922.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Ira Weiny &lt;ira.weiny@intel.com&gt;
</content>
</entry>
<entry>
<title>powerpc/papr_scm: Move duplicate definitions to common header files</title>
<updated>2024-04-25T19:37:12+00:00</updated>
<author>
<name>Shivaprasad G Bhat</name>
<email>sbhat@linux.ibm.com</email>
</author>
<published>2024-01-27T18:57:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=dbc8fc9d6de17b618591d4d2a6227dee27fe0f51'/>
<id>urn:sha1:dbc8fc9d6de17b618591d4d2a6227dee27fe0f51</id>
<content type='text'>
papr_scm and ndtest share common PDSM payload structs like
nd_papr_pdsm_health. Presently these structs are duplicated across
papr_pdsm.h and ndtest.h header files. Since 'ndtest' is essentially
arch independent and can run on platforms other than PPC64, a way
needs to be deviced to avoid redundancy and duplication of PDSM
structs in future.

So the patch proposes moving the PDSM header from arch/powerpc/include-
-/uapi/ to the generic include/uapi/linux directory. Also, there
are some #defines common between papr_scm and ndtest which are not
exported to the user space. So, move them to a header file which
can be shared across ndtest and papr_scm via newly introduced
include/linux/papr_scm.h.

Signed-off-by: Shivaprasad G Bhat &lt;sbhat@linux.ibm.com&gt;
Signed-off-by: Vaibhav Jain &lt;vaibhav@linux.ibm.com&gt;
Suggested-by: Aneesh Kumar K.V &lt;aneesh.kumar@linux.ibm.com&gt;
Link: https://lore.kernel.org/r/170638176942.112443.2937254675538057083.stgit@ltcd48-lp2.aus.stglab.ibm.com
Signed-off-by: Ira Weiny &lt;ira.weiny@intel.com&gt;
</content>
</entry>
<entry>
<title>tools/testing/nvdimm: Disable "missing prototypes / declarations" warnings</title>
<updated>2024-01-22T18:41:59+00:00</updated>
<author>
<name>Dan Williams</name>
<email>dan.j.williams@intel.com</email>
</author>
<published>2024-01-16T21:17:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c97dac57c804b53eab492ca0230d86356729d633'/>
<id>urn:sha1:c97dac57c804b53eab492ca0230d86356729d633</id>
<content type='text'>
Prevent warnings of the form:

tools/testing/nvdimm/config_check.c:4:6: error: no previous prototype
for ‘check’ [-Werror=missing-prototypes]

...by locally disabling some warnings.

It turns out that:

Commit 0fcb70851fbf ("Makefile.extrawarn: turn on missing-prototypes globally")

...in addition to expanding in-tree coverage, also impacts out-of-tree
module builds like those in tools/testing/nvdimm/.

Filter out the warning options on unit test code that does not effect
mainline builds.

Reviewed-by: Alison Schofield &lt;alison.schofield@intel.com&gt;
Link: https://lore.kernel.org/r/170543984331.460832.1780246477583036191.stgit@dwillia2-xfh.jf.intel.com
Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
</content>
</entry>
<entry>
<title>tools/testing/nvdimm: Add compile-test coverage for ndtest</title>
<updated>2023-12-15T16:07:12+00:00</updated>
<author>
<name>Dan Williams</name>
<email>dan.j.williams@intel.com</email>
</author>
<published>2023-12-07T01:59:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fddd9e3e4e716e3c484413b95579b40a7b6dbe41'/>
<id>urn:sha1:fddd9e3e4e716e3c484413b95579b40a7b6dbe41</id>
<content type='text'>
Greg lamented:
"Ick, sorry about that, obviously this test isn't actually built by any
bots :("

A quick and dirty way to prevent this problem going forward is to always
compile ndtest.ko whenever nfit_test is built. While this still does not
expose the test code to any of the known build bots, it at least makes
it the case that anyone that runs the x86 tests also compiles the
powerpc test.

I.e. the Intel NVDIMM maintainers are less likely to fall into this hole
in the future.

Link: http://lore.kernel.org/r/2023112729-aids-drainable-5744@gregkh
Cc: Greg KH &lt;gregkh@linuxfoundation.org&gt;
Cc: Yi Zhang &lt;yi.zhang@redhat.com&gt;
Cc: Dave Jiang &lt;dave.jiang@intel.com&gt;
Cc: Ira Weiny &lt;ira.weiny@intel.com&gt;
Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
Reviewed-by: Ira Weiny &lt;ira.weiny@intel.com&gt;
Reviewed-by: Dave Jiang &lt;dave.jiang@intel.com&gt;
Link: https://lore.kernel.org/r/170191437889.426826.15528612879942432918.stgit@dwillia2-xfh.jf.intel.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>ndtest: fix typo class_regster -&gt; class_register</title>
<updated>2023-11-27T18:08:02+00:00</updated>
<author>
<name>Yi Zhang</name>
<email>yi.zhang@redhat.com</email>
</author>
<published>2023-11-27T04:00:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=76cab6f4fd63129e852eb15e14d6d359b57e797f'/>
<id>urn:sha1:76cab6f4fd63129e852eb15e14d6d359b57e797f</id>
<content type='text'>
Fixes: dd6cad2dcb58 ("testing: nvdimm: make struct class structures constant")
Signed-off-by: Yi Zhang &lt;yi.zhang@redhat.com&gt;
Reviewed-by: Dave Jiang &lt;dave.jiang@intel.com&gt;
Link: https://lore.kernel.org/r/20231127040026.362729-1-yi.zhang@redhat.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>testing: nvdimm: make struct class structures constant</title>
<updated>2023-10-11T16:04:28+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2023-10-06T14:02:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=dd6cad2dcb581b2b15997b6e8d50de64644c3011'/>
<id>urn:sha1:dd6cad2dcb581b2b15997b6e8d50de64644c3011</id>
<content type='text'>
Now that the driver core allows for struct class to be in read-only
memory, we should make all 'class' structures declared at build time
placing them into read-only memory, instead of having to be dynamically
allocated at runtime.

Cc: Dan Williams &lt;dan.j.williams@intel.com&gt;
Cc: Vishal Verma &lt;vishal.l.verma@intel.com&gt;
Cc: Dave Jiang &lt;dave.jiang@intel.com&gt;
Cc: Ira Weiny &lt;ira.weiny@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Tested-by: Ira Weiny &lt;ira.weiny@intel.com&gt;
Reviewed-by: Ira Weiny &lt;ira.weiny@intel.com&gt;
Link: https://lore.kernel.org/r/2023100611-platinum-galleria-ceb3@gregkh
Signed-off-by: Ira Weiny &lt;ira.weiny@intel.com&gt;
</content>
</entry>
</feed>
