On Fri, Nov 08, 2002 at 03:40:58AM +0000, Rusty Lynch wrote:
> I have been looking into the possible ways a fault injection tool could be
> implemented on the available tools/hooks in the 2.5 kernel. I can see how
> kprobes would help by allowing me to setup handlers when a specific address
> is executed, but what about when a specific memory mapped IO address is
> touched or looked at?
>
> I know there has been a lot of activity on kprobes, LTT, and others (isn't
> there something else?). Do any of these patches allow a handler to be
> called just before some MMIO is accessed? Messing with architecture
> specific debug registers seems problematic since it makes the solution
> architecture specific and the number of watch points is pretty limited.
>
You could do this with the interface provided by kwatchpoints patch [1]
without directly mucking with debug registers. The interface is simple:
int register_kwatch(unsigned long addr, u8 length, u8 type,
kwatch_handler_t handler)
If you don't want to use debug registers or if they are not enough,
only other possibility I can think of is to find all code locations
where the MMIO space of interest is touched and put execution
probes there.
[1] You will need these two patches:
http://marc.theaimsgroup.com/?l=linux-kernel&m=103528454215523&w=2
http://marc.theaimsgroup.com/?l=linux-kernel&m=103528454015520&w=2
Cheers,
Vamsi.
-- Vamsi Krishna S. Linux Technology Center, IBM Software Lab, Bangalore. Ph: +91 80 5044959 Internet: vamsi@in.ibm.com - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Fri Nov 15 2002 - 22:00:15 EST