--- /dev/null
+Index: linux-2.4.18-chaos/arch/i386/kernel/traps.c
+===================================================================
+--- linux-2.4.18-chaos.orig/arch/i386/kernel/traps.c 2003-07-28 17:51:13.000000000 +0400
++++ linux-2.4.18-chaos/arch/i386/kernel/traps.c 2003-12-11 02:10:33.000000000 +0300
+@@ -1153,3 +1153,35 @@
+ EXPORT_SYMBOL_GPL(nmi_watchdog);
+ #endif
+
++#ifdef CONFIG_MODULES
++extern struct module *module_list;
++extern struct module kernel_module;
++#endif
++
++int is_kernel_text_address(unsigned long addr)
++{
++ int retval = 0;
++#ifdef CONFIG_MODULES
++ struct module *mod;
++#endif
++ if (addr >= (unsigned long) &_stext &&
++ addr <= (unsigned long) &_etext);
++ return 1;
++
++#ifdef CONFIG_MODULES
++ for (mod = module_list; mod != &kernel_module; mod = mod->next) {
++ /* mod_bound tests for addr being inside the vmalloc'ed
++ * module area. Of course it'd be better to test only
++ * for the .text subset... */
++ if (mod_bound(addr, 0, mod)) {
++ retval = 1;
++ break;
++ }
++ }
++#endif
++
++ return retval;
++}
++
++EXPORT_SYMBOL(lookup_symbol);
++EXPORT_SYMBOL_GPL(is_kernel_text_address);