[2.5.47]Add exported valid_kernel_address()
PATCH 1/1 [2.5.47]Add exported valid_kernel_address()
The following is a small patch to the 2.5.47 kernel that adds an exported function called valid_kernel_address() that allows kernel code to verify a kernel-mapped address is valid.
valid_kernel_address just calls the static inline kernel_text_address() function defined in arch/i386/kernel/traps.c
-rustyl
arch/i386/kernel/i386_ksyms.c +3 -0
@@ -59,6 +59,8 @@extern unsigned long cpu_khz;extern unsigned long get_cmos_time (void ); +extern int valid_kernel_address (unsigned long addr); +/* platform dependent support */ EXPORT_SYMBOL (boot_cpu_data);#ifdef CONFIG_EISA
@@ -91,6 +93,7 @@EXPORT_SYMBOL (get_cmos_time);EXPORT_SYMBOL (cpu_khz);EXPORT_SYMBOL (apm_info); +EXPORT_SYMBOL (valid_kernel_address);#ifdef CONFIG_DEBUG_IOVIRT EXPORT_SYMBOL (__io_virt_debug);
arch/i386/kernel/traps.c +5 -0
@@ -129,6 +129,11 @@#endif +int valid_kernel_address (unsigned long addr) +{ +return kernel_text_address (addr); +} +void show_trace (unsigned long * stack) {int i;
Quoted 7 lines · Rusty Lynch
The following is a small patch to the 2.5.47 kernel that adds an exported function called
valid_kernel_address()that allows kernel code to verify a kernel-mapped address is valid.
valid_kernel_addressjust calls the static inlinekernel_text_address()function defined inarch/i386/kernel/traps.c
it is customary that people who ask for an export explain why they need it.... would you mind explaining that ?