RE: [Fault-injection-developer] RFC: fi_dbp (More information abo ut fi_dbp)
Status: Alpha
Brought to you by:
rustyl
|
From: Wang, S. <sta...@in...> - 2003-01-03 00:54:52
|
Sorry for lacking description for it :)
> I would like to build PIO interceptor on a base of Kprobes.
> I'll illustrate the workflow of them.
> The one (whose name is "DBP") based on Kprobes:
> Registration/Unregistration:
> wp_register =20
> core -------------------->dbp_register--------------> register_kprobe
>=20
> wp_unregister =20
> core -------------------->dbp_unregister--------------> =
unregister_kprobe
>=20
>=20
> Fault injection:
> =20
> there is write fault
>
do_int3----------------->dbp_pre_kprobe_handler-------------------------=
->co
> re-------------->(inject write fault)
>=20
>
do_debug------------->dbp_post_kpobe_handler-------------------------->c=
ore-
> --------------
> ------->inject read fault or restore context for injected write fault
>=20
> pros:
> 1. As many breakpoints as you wish :)
>=20
> cons:
> 1. A user mode utility is needed for finding all IO related =
instructions
> out.
> 2. And we need to export the symbol "modules" for locating the wanted
> instructions.
=20
The utility(fi_attach) for fi_dbp is responsible for finding and =
locating
all PIO=20
instruction in a loaded kernel module.
fi_attach useage:
./fi_attach $module_name
You could use /sys/fault_injection/interceptors/dbp_interceptor/ctl =
directly
also:
echo "attach $module_name $instruction_counter" > ctl
echo "add $instruction_addr" > ctl
echo "add $instruction_addr" > ctl
echo "add $instruction_addr" > ctl
echo "add $instruction_addr" > ctl =20
| |
| |
echo "end" > ctl
When you want to detach the module from fi_dbp:
echo "detach $module_name" > ctl
That's all :)
Thanks.
> -----Original Message-----
> From: Rusty Lynch [mailto:ru...@li...]
> Sent: 2003=C4=EA1=D4=C23=C8=D5 8:28
> To: Wang, Stanley; fau...@li...
> Subject: Re: [Fault-injection-developer] RFC: fi_dbp
>=20
>=20
> Wow, I could use a trail of bread crumbs to lead me through this =
code.
> How about at least giving some basic information at the top=20
> of fi_dbp.c
> like:
>=20
> * What does dbp mean?
> * How is this interceptor used?=20
> * What is this extra 'ctl' file for? Maybe explain the whole=20
> attaching,=20
> adding, detaching cycle.
>=20
> -rustyl
>=20
|