aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/Kconfig.debug
diff options
context:
space:
mode:
authorPekka Paalanen <pq@iki.fi>2008-05-12 15:20:56 -0400
committerThomas Gleixner <tglx@linutronix.de>2008-05-24 05:21:14 -0400
commit8b7d89d02ef3c6a7c73d6596f28cea7632850af4 (patch)
tree32601bf4f34dd9e3ec1e9610c555e10dc448006c /arch/x86/Kconfig.debug
parent677aa9f77e8de3791b481a0cec6c8b84d1eec626 (diff)
x86: mmiotrace - trace memory mapped IO
Mmiotrace is a tool for trapping memory mapped IO (MMIO) accesses within the kernel. It is used for debugging and especially for reverse engineering evil binary drivers. Mmiotrace works by wrapping the ioremap family of kernel functions and marking the returned pages as not present. Access to the IO memory triggers a page fault, which will be handled by mmiotrace's custom page fault handler. This will single-step the faulted instruction with the MMIO page marked as present. Access logs are directed to user space via relay and debug_fs. This page fault approach is necessary, because binary drivers have readl/writel etc. calls inlined and therefore extremely difficult to trap with with e.g. kprobes. This patch depends on the custom page fault handlers patch. Signed-off-by: Pekka Paalanen <pq@iki.fi> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/Kconfig.debug')
-rw-r--r--arch/x86/Kconfig.debug27
1 files changed, 27 insertions, 0 deletions
diff --git a/arch/x86/Kconfig.debug b/arch/x86/Kconfig.debug
index 9431a8399844..7c6496e2225e 100644
--- a/arch/x86/Kconfig.debug
+++ b/arch/x86/Kconfig.debug
@@ -176,6 +176,33 @@ config PAGE_FAULT_HANDLERS
176 register a function that is called on every page fault. Custom 176 register a function that is called on every page fault. Custom
177 handlers are used by some debugging and reverse engineering tools. 177 handlers are used by some debugging and reverse engineering tools.
178 178
179config MMIOTRACE
180 tristate "Memory mapped IO tracing"
181 depends on DEBUG_KERNEL && PAGE_FAULT_HANDLERS && RELAY && DEBUG_FS
182 default n
183 help
184 This will build a kernel module called mmiotrace.
185
186 Mmiotrace traces Memory Mapped I/O access and is meant for debugging
187 and reverse engineering. The kernel module offers wrapped
188 versions of the ioremap family of functions. The driver to be traced
189 must be modified to call these wrappers. A user space program is
190 required to collect the MMIO data.
191
192 See http://nouveau.freedesktop.org/wiki/MmioTrace
193 If you are not helping to develop drivers, say N.
194
195config MMIOTRACE_TEST
196 tristate "Test module for mmiotrace"
197 depends on MMIOTRACE && m
198 default n
199 help
200 This is a dumb module for testing mmiotrace. It is very dangerous
201 as it will write garbage to IO memory starting at a given address.
202 However, it should be safe to use on e.g. unused portion of VRAM.
203
204 Say N, unless you absolutely know what you are doing.
205
179# 206#
180# IO delay types: 207# IO delay types:
181# 208#