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]
Date:	Fri, 18 Mar 2016 01:29:37 +0900
From:	Magnus Damm <magnus.damm@...il.com>
To:	iommu@...ts.linux-foundation.org
Cc:	laurent.pinchart+renesas@...asonboard.com, geert+renesas@...der.be,
	joro@...tes.org, linux-kernel@...r.kernel.org,
	linux-renesas-soc@...r.kernel.org, horms+renesas@...ge.net.au,
	Magnus Damm <magnus.damm@...il.com>
Subject: [PATCH 03/10] iommu/ipmmu-vmsa: Teach xlate() to skip disabled iommus

From: Magnus Damm <damm+renesas@...nsource.se>

Right now the ->xlate() call gets invoked even though
the iommu device has status = "disabled" in DT, so
make sure we skip over disabled devices.

In my mind it would make sense to have this at some
shared level, but I guess some users may want to
configure the iommu regardless of DT state.

Signed-off-by: Magnus Damm <damm+renesas@...nsource.se>
---

 drivers/iommu/ipmmu-vmsa.c |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

--- 0017/drivers/iommu/ipmmu-vmsa.c
+++ work/drivers/iommu/ipmmu-vmsa.c	2016-03-18 00:16:51.200513000 +0900
@@ -890,7 +890,13 @@ static struct iommu_group *ipmmu_device_
 static int ipmmu_of_xlate_dma(struct device *dev,
 			      struct of_phandle_args *spec)
 {
-	/* dummy callback to satisfy of_iommu_configure() */
+	/* If the IPMMU device is disabled in DT then return error
+	 * to make sure the of_iommu code does not install ops
+	 * even though the iommu device is disabled
+	 */
+	if (!of_device_is_available(spec->np))
+		return -ENODEV;
+
 	return 0;
 }
 #endif

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ