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
| ||
|
Message-ID: <CAKb7UvjTmD3kswPreN4FZzwt2EfFk04s1QQC63P0jb-BJ5tW9w@mail.gmail.com> Date: Tue, 12 Dec 2017 09:21:10 -0500 From: Ilia Mirkin <imirkin@...m.mit.edu> To: Ingo Molnar <mingo@...nel.org> Cc: Peter Zijlstra <peterz@...radead.org>, "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, Pekka Paalanen <ppaalanen@...il.com>, Lyude <lyude@...hat.com>, Steven Rostedt <rostedt@...dmis.org>, Thomas Gleixner <tglx@...utronix.de>, Karol Herbst <kherbst@...hat.com>, Linus Torvalds <torvalds@...ux-foundation.org>, hpa@...or.com, linux-tip-commits@...r.kernel.org, Karol Herbst <karolherbst@...il.com> Subject: Re: [tip:x86/urgent] x86/mm/kmmio: Fix mmiotrace for page unaligned addresses On Tue, Dec 12, 2017 at 9:04 AM, Ingo Molnar <mingo@...nel.org> wrote: > > * Peter Zijlstra <peterz@...radead.org> wrote: > >> On Tue, Dec 12, 2017 at 02:55:30AM -0800, tip-bot for Karol Herbst wrote: >> > Commit-ID: 6d60ce384d1d5ca32b595244db4077a419acc687 >> > Gitweb: https://git.kernel.org/tip/6d60ce384d1d5ca32b595244db4077a419acc687 >> > Author: Karol Herbst <kherbst@...hat.com> >> > AuthorDate: Mon, 27 Nov 2017 08:51:39 +0100 >> > Committer: Ingo Molnar <mingo@...nel.org> >> > CommitDate: Mon, 11 Dec 2017 15:35:18 +0100 >> > >> > x86/mm/kmmio: Fix mmiotrace for page unaligned addresses >> >> OK, let me hijack this thread since apparently people use and care about >> mmiotrace. >> >> I was recently auditing the x86 tlb flushing and ran across this >> 'thing'. Can someone please explain to me how this is supposed to work >> and how its not completely broken? The "thing" being mmiotrace, or the "thing" being page-unaligned addresses? If the former, its primary use-case is for snooping on the NVIDIA proprietary GPU driver in order to figure out how to drive the underlying hardware. The driver does ioremap's to get at PCI space, which mmiotrace "steals" and provides pages without a present bit set, along with a fault handler. When the fault handler is hit, it reinstates the faulting page, and single-steps the faulting instruction reading the before/after regs to determine what happened (doesn't work universally, but enough for instructions used for PCI MMIO accesses). See mmio-mod.c::pre and post (the latter is called from the debug handler). You may be interested in reading Documentation/trace/mmiotrace.txt::How Mmiotrace Works Cheers, -ilia
Powered by blists - more mailing lists