1 Index: linux-2.4.20-uml/arch/um/kernel/Makefile
2 ===================================================================
3 --- linux-2.4.20-uml.orig/arch/um/kernel/Makefile 2003-11-10 13:42:48.000000000 +0800
4 +++ linux-2.4.20-uml/arch/um/kernel/Makefile 2003-11-10 13:43:06.000000000 +0800
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.20-uml/arch/um/kernel/sysrq.c
16 ===================================================================
17 --- linux-2.4.20-uml.orig/arch/um/kernel/sysrq.c 2003-11-10 13:42:49.000000000 +0800
18 +++ linux-2.4.20-uml/arch/um/kernel/sysrq.c 2003-11-10 13:43:06.000000000 +0800
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.20-uml/arch/i386/kernel/Makefile
58 ===================================================================
59 --- linux-2.4.20-uml.orig/arch/i386/kernel/Makefile 2002-11-29 07:53:09.000000000 +0800
60 +++ linux-2.4.20-uml/arch/i386/kernel/Makefile 2003-11-10 14:39:28.000000000 +0800
65 -export-objs := mca.o mtrr.o msr.o cpuid.o microcode.o i386_ksyms.o time.o
66 +export-objs := mca.o mtrr.o msr.o cpuid.o microcode.o i386_ksyms.o time.o \
69 obj-y := process.o semaphore.o signal.o entry.o traps.o irq.o vm86.o \
70 ptrace.o i8259.o ioport.o ldt.o setup.o time.o sys_i386.o \
71 Index: linux-2.4.20-uml/arch/i386/kernel/traps.c
72 ===================================================================
73 --- linux-2.4.20-uml.orig/arch/i386/kernel/traps.c 2002-11-29 07:53:09.000000000 +0800
74 +++ linux-2.4.20-uml/arch/i386/kernel/traps.c 2003-11-10 14:53:53.000000000 +0800
75 @@ -1004,3 +1004,41 @@
80 +#ifdef CONFIG_MODULES
81 +extern struct module *module_list;
82 +extern struct module kernel_module;
85 +int is_kernel_text_address(unsigned long addr)
88 +#ifdef CONFIG_MODULES
91 + if (addr >= (unsigned long) &_stext &&
92 + addr <= (unsigned long) &_etext);
95 +#ifdef CONFIG_MODULES
96 + for (mod = module_list; mod != &kernel_module; mod = mod->next) {
97 + /* mod_bound tests for addr being inside the vmalloc'ed
98 + * module area. Of course it'd be better to test only
99 + * for the .text subset... */
100 + if (mod_bound(addr, 0, mod)) {
110 +int lookup_symbol(unsigned long address, char *buf, int buflen)
115 +EXPORT_SYMBOL_GPL(is_kernel_text_address);
116 +EXPORT_SYMBOL_GPL(lookup_symbol);