lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260118135440.1958279-39-den@valinux.co.jp>
Date: Sun, 18 Jan 2026 22:54:40 +0900
From: Koichiro Den <den@...inux.co.jp>
To: Frank.Li@....com,
	dave.jiang@...el.com,
	cassel@...nel.org,
	mani@...nel.org,
	kwilczynski@...nel.org,
	kishon@...nel.org,
	bhelgaas@...gle.com,
	geert+renesas@...der.be,
	robh@...nel.org,
	vkoul@...nel.org,
	jdmason@...zu.us,
	allenbh@...il.com,
	jingoohan1@...il.com,
	lpieralisi@...nel.org
Cc: linux-pci@...r.kernel.org,
	linux-doc@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	linux-renesas-soc@...r.kernel.org,
	devicetree@...r.kernel.org,
	dmaengine@...r.kernel.org,
	iommu@...ts.linux.dev,
	ntb@...ts.linux.dev,
	netdev@...r.kernel.org,
	linux-kselftest@...r.kernel.org,
	arnd@...db.de,
	gregkh@...uxfoundation.org,
	joro@...tes.org,
	will@...nel.org,
	robin.murphy@....com,
	magnus.damm@...il.com,
	krzk+dt@...nel.org,
	conor+dt@...nel.org,
	corbet@....net,
	skhan@...uxfoundation.org,
	andriy.shevchenko@...ux.intel.com,
	jbrunet@...libre.com,
	utkarsh02t@...il.com
Subject: [RFC PATCH v4 38/38] selftests: pci_endpoint: Add remote eDMA transfer coverage

Extend the pci_endpoint_test kselftest with a 'remote_edma' variant for
READ/WRITE tests. The variant sets PCITEST_FLAGS_USE_REMOTE_EDMA and
skips the test when the feature is not supported.

Also treat -EOPNOTSUPP from BAR tests as "BAR is reserved" and skip,
since the host driver may reserve a BAR for remote-eDMA metadata.

Signed-off-by: Koichiro Den <den@...inux.co.jp>
---
 .../selftests/pci_endpoint/pci_endpoint_test.c  | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/tools/testing/selftests/pci_endpoint/pci_endpoint_test.c b/tools/testing/selftests/pci_endpoint/pci_endpoint_test.c
index 23aac6f97061..39593da3b40d 100644
--- a/tools/testing/selftests/pci_endpoint/pci_endpoint_test.c
+++ b/tools/testing/selftests/pci_endpoint/pci_endpoint_test.c
@@ -67,6 +67,8 @@ TEST_F(pci_ep_bar, BAR_TEST)
 	pci_ep_ioctl(PCITEST_BAR, variant->barno);
 	if (ret == -ENODATA)
 		SKIP(return, "BAR is disabled");
+	if (ret == -EOPNOTSUPP)
+		SKIP(return, "BAR is reserved");
 	EXPECT_FALSE(ret) TH_LOG("Test failed for BAR%d", variant->barno);
 }
 
@@ -165,16 +167,25 @@ FIXTURE_TEARDOWN(pci_ep_data_transfer)
 FIXTURE_VARIANT(pci_ep_data_transfer)
 {
 	bool use_dma;
+	bool use_remote_edma;
 };
 
 FIXTURE_VARIANT_ADD(pci_ep_data_transfer, memcpy)
 {
 	.use_dma = false,
+	.use_remote_edma = false,
 };
 
 FIXTURE_VARIANT_ADD(pci_ep_data_transfer, dma)
 {
 	.use_dma = true,
+	.use_remote_edma = false,
+};
+
+FIXTURE_VARIANT_ADD(pci_ep_data_transfer, remote_edma)
+{
+	.use_dma = false,
+	.use_remote_edma = true,
 };
 
 TEST_F(pci_ep_data_transfer, READ_TEST)
@@ -184,6 +195,8 @@ TEST_F(pci_ep_data_transfer, READ_TEST)
 
 	if (variant->use_dma)
 		param.flags = PCITEST_FLAGS_USE_DMA;
+	if (variant->use_remote_edma)
+		param.flags = PCITEST_FLAGS_USE_REMOTE_EDMA;
 
 	pci_ep_ioctl(PCITEST_SET_IRQTYPE, PCITEST_IRQ_TYPE_AUTO);
 	ASSERT_EQ(0, ret) TH_LOG("Can't set AUTO IRQ type");
@@ -203,6 +216,8 @@ TEST_F(pci_ep_data_transfer, WRITE_TEST)
 
 	if (variant->use_dma)
 		param.flags = PCITEST_FLAGS_USE_DMA;
+	if (variant->use_remote_edma)
+		param.flags = PCITEST_FLAGS_USE_REMOTE_EDMA;
 
 	pci_ep_ioctl(PCITEST_SET_IRQTYPE, PCITEST_IRQ_TYPE_AUTO);
 	ASSERT_EQ(0, ret) TH_LOG("Can't set AUTO IRQ type");
@@ -222,6 +237,8 @@ TEST_F(pci_ep_data_transfer, COPY_TEST)
 
 	if (variant->use_dma)
 		param.flags = PCITEST_FLAGS_USE_DMA;
+	if (variant->use_remote_edma)
+		SKIP(return, "Remote eDMA is not supported");
 
 	pci_ep_ioctl(PCITEST_SET_IRQTYPE, PCITEST_IRQ_TYPE_AUTO);
 	ASSERT_EQ(0, ret) TH_LOG("Can't set AUTO IRQ type");
-- 
2.51.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ