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: <035c998d4a5508ba999a9c87ea70c73dc130e804.1376672275.git.shuah.kh@samsung.com>
Date:	Fri, 16 Aug 2013 11:20:17 -0600
From:	Shuah Khan <shuah.kh@...sung.com>
To:	joro@...tes.org, alex.williamson@...hat.com,
	Varun.Sethi@...escale.com, udknight@...il.com, aik@...abs.ru,
	rostedt@...dmis.org, fweisbec@...il.com, mingo@...hat.com
Cc:	Shuah Khan <shuah.kh@...sung.com>, linux-kernel@...r.kernel.org,
	iommu@...ts.linux-foundation.org, shuahkhan@...il.com
Subject: [PATCH 2/2] iommu: Change iommu driver to call report_fault trace event

Change iommu driver report_iommu_fault() to call report_fault trace event.
This iommu_fault class event can be enabled to trigger when an iommu fault
occurs. Trace information includes driver name, device name, iova, and flags.

Testing:
Added trace calls to iommu_prepare_identity_map() for testing some of the
conditions that are hard to trigger. Here is the trace from the testing:

       swapper/0-1     [003] ....     1.926331: report_fault: IOMMU:pci 0000:00:1d.0 iova=0x00000000cadc6000 flags=0x0001

Signed-off-by: Shuah Khan <shuah.kh@...sung.com>
---
 include/linux/iommu.h |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/linux/iommu.h b/include/linux/iommu.h
index 3aeb730..9d1c051 100644
--- a/include/linux/iommu.h
+++ b/include/linux/iommu.h
@@ -22,6 +22,7 @@
 #include <linux/errno.h>
 #include <linux/err.h>
 #include <linux/types.h>
+#include <trace/events/iommu.h>
 
 #define IOMMU_READ	(1)
 #define IOMMU_WRITE	(2)
@@ -211,6 +212,7 @@ static inline int report_iommu_fault(struct iommu_domain *domain,
 		ret = domain->handler(domain, dev, iova, flags,
 						domain->handler_token);
 
+	trace_report_fault(dev, iova, flags);
 	return ret;
 }
 
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ