[Fault-injection-developer] RFC: fi_dbp infrastructure.
Status: Alpha
Brought to you by:
rustyl
From: Wang, S. <sta...@in...> - 2002-12-31 10:09:30
|
Hi, folks Here is fi_dbp infrastructure: # This is a BitKeeper generated patch for the following project: # Project Name: Linux kernel tree # This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas: # ChangeSet 1.961 -> 1.977 # arch/i386/Kconfig 1.28 -> 1.30 # kernel/module.c 1.32 -> 1.35 # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 02/12/27 st...@ma... 1.962 # Add FI_DBP infrastructure # -------------------------------------------- # 02/12/27 st...@ma... 1.963 # Split fi_find_module into fi_get_moudule and fi_put_module # -------------------------------------------- # 02/12/27 st...@ma... 1.965 # fix warning. # -------------------------------------------- diff -Nru a/arch/i386/Kconfig b/arch/i386/Kconfig --- a/arch/i386/Kconfig Tue Dec 31 17:43:41 2002 +++ b/arch/i386/Kconfig Tue Dec 31 17:43:41 2002 @@ -1567,6 +1567,22 @@ If in doubt, say N. +config FI_DBP + tristate "Fault Injection Dynamic Binary Patch (EXPERIMENTAL)" + depends on FI + help + This component adds the ability for Fault Injection to intercept + int3's handler. When combined with the core fault injection + infrastructure and a user space tool chain, it will be possible + to create test cases that inject fault into normal PIO access. + + This driver is also available as a module ( = code which can be + inserted in and removed from the running kernel whenever you want). + The module will be called fi_dbp.o. If you want to compile it as + a module, say M here and read <file:Documentation/modules.txt>. + + If in doubt, say N. + config FI_IRQ tristate "Fault Injection Irq Interceptor (EXPERIMENTAL)" depends on KIRQ diff -Nru a/kernel/module.c b/kernel/module.c --- a/kernel/module.c Tue Dec 31 17:43:41 2002 +++ b/kernel/module.c Tue Dec 31 17:43:41 2002 @@ -1412,3 +1412,19 @@ /* Obsolete lvalue for broken code which asks about usage */ int module_dummy_usage = 1; EXPORT_SYMBOL(module_dummy_usage); + +#if defined(CONFIG_FI_DBP) || defined(CONFIG_FI_DBP_MODULE) +struct module *fi_get_module(const char *name) +{ + down(&module_mutex); + return find_module(name); +} +void fi_put_module(void) +{ + up(&module_mutex); +} +EXPORT_SYMBOL_GPL(fi_get_module); +EXPORT_SYMBOL_GPL(fi_put_module); +#endif Your Sincerely, Stanley Wang SW Engineer, Intel Corporation. Intel China Software Lab. Tel: 021-52574545 ext. 1171 iNet: 8-752-1171 Opinions expressed are those of the author and do not represent Intel Corporation |