1 Index: linux-2.4.21/arch/um/kernel/Makefile
2 ===================================================================
3 --- linux-2.4.21.orig/arch/um/kernel/Makefile 2004-04-24 02:37:58.000000000 -0400
4 +++ linux-2.4.21/arch/um/kernel/Makefile 2004-04-24 02:51:03.000000000 -0400
6 export-objs-$(CONFIG_GPROF) += gprof_syms.o
7 export-objs-$(CONFIG_GCOV) += gmon_syms.o
9 -export-objs = ksyms.o process_kern.o signal_kern.o user_syms.o $(export-objs-y)
10 +export-objs = ksyms.o process_kern.o signal_kern.o user_syms.o sysrq.o \
13 CFLAGS_user_syms.o = -D__AUTOCONF_INCLUDED__ $(DMODULES-y) $(DMODVERSIONS-y) \
14 -I/usr/include -I../include
15 Index: linux-2.4.21/arch/um/kernel/sysrq.c
16 ===================================================================
17 --- linux-2.4.21.orig/arch/um/kernel/sysrq.c 2004-04-24 02:37:58.000000000 -0400
18 +++ linux-2.4.21/arch/um/kernel/sysrq.c 2004-04-24 02:51:03.000000000 -0400
20 show_trace((unsigned long *)esp);
23 +#ifdef CONFIG_MODULES
24 +extern struct module *module_list;
25 +extern struct module kernel_module;
28 +int is_kernel_text_address(unsigned long addr)
31 +#ifdef CONFIG_MODULES
34 + if (addr >= (unsigned long) &_stext &&
35 + addr <= (unsigned long) &_etext)
38 +#ifdef CONFIG_MODULES
39 + for (mod = module_list; mod != &kernel_module; mod = mod->next) {
40 + /* mod_bound tests for addr being inside the vmalloc'ed
41 + * module area. Of course it'd be better to test only
42 + * for the .text subset... */
43 + if (mod_bound(addr, 0, mod)) {
52 +EXPORT_SYMBOL(is_kernel_text_address);
55 * Overrides for Emacs so that we follow Linus's tabbing style.
56 * Emacs will notice this stuff at the end of the file and automatically
57 Index: linux-2.4.21/arch/i386/kernel/Makefile
58 ===================================================================
59 --- linux-2.4.21.orig/arch/i386/kernel/Makefile 2004-04-24 02:39:05.000000000 -0400
60 +++ linux-2.4.21/arch/i386/kernel/Makefile 2004-04-24 02:51:26.000000000 -0400
65 -export-objs := mca.o mtrr.o msr.o cpuid.o microcode.o i386_ksyms.o time.o traps.o dr_alloc.o
66 +export-objs := mca.o mtrr.o msr.o cpuid.o microcode.o i386_ksyms.o time.o traps.o dr_alloc.o traps.o
68 ifdef CONFIG_X86_SPEEDSTEP_ICH
69 export-objs += speedstep-lib.o
70 Index: linux-2.4.21/arch/i386/kernel/traps.c
71 ===================================================================
72 --- linux-2.4.21.orig/arch/i386/kernel/traps.c 2004-04-24 02:42:58.000000000 -0400
73 +++ linux-2.4.21/arch/i386/kernel/traps.c 2004-04-24 02:51:03.000000000 -0400
74 @@ -1339,3 +1339,41 @@
79 +#ifdef CONFIG_MODULES
80 +extern struct module *module_list;
81 +extern struct module kernel_module;
84 +int is_kernel_text_address(unsigned long addr)
87 +#ifdef CONFIG_MODULES
90 + if (addr >= (unsigned long) &_stext &&
91 + addr <= (unsigned long) &_etext);
94 +#ifdef CONFIG_MODULES
95 + for (mod = module_list; mod != &kernel_module; mod = mod->next) {
96 + /* mod_bound tests for addr being inside the vmalloc'ed
97 + * module area. Of course it'd be better to test only
98 + * for the .text subset... */
99 + if (mod_bound(addr, 0, mod)) {
109 +int lookup_symbol(unsigned long address, char *buf, int buflen)
114 +EXPORT_SYMBOL_GPL(is_kernel_text_address);
115 +EXPORT_SYMBOL_GPL(lookup_symbol);