Re: [RFC] mmiotrace full patch, preview 2

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Vegard Nossum <vegard.nossum@...>
Cc: <linux-kernel@...>, Ingo Molnar <mingo@...>, Christoph Hellwig <hch@...>, Arjan van de Ven <arjan@...>, Pavel Roskin <proski@...>, Steven Rostedt <rostedt@...>, Peter Zijlstra <a.p.zijlstra@...>
Date: Friday, March 28, 2008 - 2:24 pm

On Fri, 28 Mar 2008 00:13:48 +0100
"Vegard Nossum" <vegard.nossum@gmail.com> wrote:


I guess that would be appropriate. I think it should go into this
function:

+static int kmmio_die_notifier(struct notifier_block *nb, unsigned long val,
+								void *args)
+{
+	struct die_args *arg = args;
+
+	if (val == DIE_DEBUG)
+		if (post_kmmio_handler(arg->err, arg->regs) == 1)
+			return NOTIFY_STOP;
+
+	return NOTIFY_DONE;
+}

On the other hand I am thinking of not using the die notifier chain
at all and adding a direct call from do_debug() or something.
This is the last dynamic hook remaining from the out-of-tree module
era of mmiotrace.

I guess with the notifier list there is a possibility that another
module intercepts my single step trap, so that this is never called,
which would leave mmiotrace half blind, and also trigger a recursive
probe hit.

btw. what if someone uses kmemcheck and mmiotrace at the same time?
Mmiotrace will not fiddle with any other pages than returned via
__ioremap(), but can kmemcheck "hide" the same mmio pages?
Also keeping in mind, that some day I'd like to make mmiotrace able
to catch mmio accesses originating in user space.


Thanks.

-- 
Pekka Paalanen
http://www.iki.fi/pq/
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC] mmiotrace full patch, preview 2, Pekka Paalanen, (Sun Mar 9, 10:40 am)
mmiotrace bug: recursive probe hit, Pekka Paalanen, (Fri Mar 28, 4:25 pm)
Re: mmiotrace bug: recursive probe hit, Pekka Paalanen, (Sun Mar 30, 1:26 pm)
Re: mmiotrace bug: recursive probe hit, Pekka Paalanen, (Thu Apr 3, 5:07 pm)
Re: mmiotrace bug: recursive probe hit, Avi Kivity, (Sat Apr 5, 3:36 am)
Re: mmiotrace bug: recursive probe hit, Pekka Paalanen, (Sun Apr 6, 1:32 pm)
Re: mmiotrace bug: recursive probe hit, Pekka Enberg, (Sat Apr 5, 3:40 am)
Re: mmiotrace bug: recursive probe hit, Avi Kivity, (Sat Apr 5, 8:39 am)
Re: mmiotrace bug: recursive probe hit, Avi Kivity, (Sat Apr 5, 11:58 am)
Re: mmiotrace bug: recursive probe hit, Vegard Nossum, (Thu Apr 3, 5:40 pm)
Re: mmiotrace bug: recursive probe hit, Pekka Paalanen, (Fri Apr 4, 9:18 am)
Re: [RFC] mmiotrace full patch, preview 2, Vegard Nossum, (Thu Mar 27, 7:13 pm)
Re: [RFC] mmiotrace full patch, preview 2, Pekka Paalanen, (Fri Mar 28, 2:24 pm)
Re: [RFC] mmiotrace full patch, preview 2, Pekka Paalanen, (Sun Mar 9, 10:46 am)