MmioTrace: Using the Instruction Decoder, etc.

2013-10-28 Thread Eugene Shatokhin
Hi, That's OK. The first rule of a good software developer is, they say, 'if that works - don't touch it'. :-) There are definitely many other things to do. Thanks for your feedback! Regards, Eugene 2013/10/28 Pekka Paalanen > On Fri, 25 Oct 2013 17:19:56 +0400 > Eugene Shatokhin wrote:

MmioTrace: Using the Instruction Decoder, etc.

2013-10-28 Thread Pekka Paalanen
On Fri, 25 Oct 2013 17:19:56 +0400 Eugene Shatokhin wrote: > Hi, > > 2013/10/25 Pekka Paalanen > ... > > We could use some comments from the real reverse-engineers. I used > > to be mostly a tool writer. > > > > Yes, if some experts could share their knowledge of this matter, this would > be

MmioTrace: Using the Instruction Decoder, etc.

2013-10-25 Thread Eugene Shatokhin
Hi, 2013/10/25 Pekka Paalanen > > Just curious, how do you detect interesting instructions to > instrument from uninteresting instructions that do not access mmio > areas? > > As I currently use this for data race detection in general, there is no need to separate accesses to mmio areas from the

MmioTrace: Using the Instruction Decoder, etc.

2013-10-25 Thread Pekka Paalanen
On Sat, 19 Oct 2013 17:12:20 +0400 Eugene Shatokhin wrote: > Hi, > > > Ah, you are not using the ftrace framework nor relayfs? Mmiotrace > used to be relayfs at one point and then converted to ftrace. > > Yes, I considered these when I started working on KernelStrider but finally > borrowed i

MmioTrace: Using the Instruction Decoder, etc.

2013-10-19 Thread Eugene Shatokhin
Oh, messed up the registers in the example. Should be like this: If some original function of the driver contained, say, mov 0xabcd (%rax), %rsi mov %rdx, 0xbeeffeed (%rsi) that will be transformed to something like lea 0xabcd (%rax), %rbx mov %rbx, mov 0xabcd (%rax), %rsi lea 0xbeeffeed (%rsi

MmioTrace: Using the Instruction Decoder, etc.

2013-10-19 Thread Eugene Shatokhin
Hi, > Ah, you are not using the ftrace framework nor relayfs? Mmiotrace used to be relayfs at one point and then converted to ftrace. Yes, I considered these when I started working on KernelStrider but finally borrowed ideas from Perf and implemented them. A mmapped ring buffer does its job wel

MmioTrace: Using the Instruction Decoder, etc.

2013-10-19 Thread Pekka Paalanen
On Fri, 18 Oct 2013 00:11:15 +0400 Eugene Shatokhin wrote: > Hi, > > Good to know that! > > Yes, it should be faster than page faulting, although I haven't done the > benchmarking yet. And yes, it is not needed to disable all but one CPU. In > my current implementation, I use an ordered workque

MmioTrace: Using the Instruction Decoder, etc.

2013-10-18 Thread Eugene Shatokhin
Hi, Good to know that! Yes, it should be faster than page faulting, although I haven't done the benchmarking yet. And yes, it is not needed to disable all but one CPU. In my current implementation, I use an ordered workqueue to send the data to the mmapped output buffer (where they will be read f

MmioTrace: Using the Instruction Decoder, etc.

2013-10-17 Thread Pekka Paalanen
On Mon, 14 Oct 2013 22:45:09 +0400 Eugene Shatokhin wrote: > Hi, > > There is an interesting TODO item on MmioTraceDeveloper page: > "kprobes has a generic instruction decoding facility, use that instead of > homebrewn (or KVM), and use emulation instead of page faulting" > > Actually, I have d