public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cxl_test: require 64-bit
@ 2022-12-19 19:50 Luis Chamberlain
  2022-12-20  0:32 ` Dan Williams
  0 siblings, 1 reply; 2+ messages in thread
From: Luis Chamberlain @ 2022-12-19 19:50 UTC (permalink / raw)
  To: alison.schofield, vishal.l.verma, ira.weiny, bwidawsk,
	dan.j.williams
  Cc: dave, a.manzanares, mcgrof, linux-cxl, linux-kernel

size_t is limited to 32-bits and so the gen_pool_alloc() using
the size of SZ_64G would map to 0, triggering a low allocation
which is not expected. Force the dependency on 64-bit for cxl_test
as that is what it was designed for.

This issue was found by build test reports when converting this
driver as a proper upstream driver.

Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
---
 tools/testing/cxl/config_check.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/testing/cxl/config_check.c b/tools/testing/cxl/config_check.c
index c4c457e59841..99b56b5f6edf 100644
--- a/tools/testing/cxl/config_check.c
+++ b/tools/testing/cxl/config_check.c
@@ -7,6 +7,7 @@ void check(void)
 	 * These kconfig symbols must be set to "m" for cxl_test to load
 	 * and operate.
 	 */
+	BUILD_BUG_ON(!IS_ENABLED(CONFIG_64BIT));
 	BUILD_BUG_ON(!IS_MODULE(CONFIG_CXL_BUS));
 	BUILD_BUG_ON(!IS_MODULE(CONFIG_CXL_ACPI));
 	BUILD_BUG_ON(!IS_MODULE(CONFIG_CXL_PMEM));
-- 
2.35.1


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

* RE: [PATCH] cxl_test: require 64-bit
  2022-12-19 19:50 [PATCH] cxl_test: require 64-bit Luis Chamberlain
@ 2022-12-20  0:32 ` Dan Williams
  0 siblings, 0 replies; 2+ messages in thread
From: Dan Williams @ 2022-12-20  0:32 UTC (permalink / raw)
  To: Luis Chamberlain, alison.schofield, vishal.l.verma, ira.weiny,
	bwidawsk, dan.j.williams
  Cc: dave, a.manzanares, mcgrof, linux-cxl, linux-kernel

Luis Chamberlain wrote:
> size_t is limited to 32-bits and so the gen_pool_alloc() using
> the size of SZ_64G would map to 0, triggering a low allocation
> which is not expected. Force the dependency on 64-bit for cxl_test
> as that is what it was designed for.
> 
> This issue was found by build test reports when converting this
> driver as a proper upstream driver.

Looks good to me, changed the subject to tools/testing/cxl/ and applied for 6.3.

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

end of thread, other threads:[~2022-12-20  0:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-19 19:50 [PATCH] cxl_test: require 64-bit Luis Chamberlain
2022-12-20  0:32 ` Dan Williams

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