From: Michael Gernoth Date: Sun, 22 May 2011 10:43:48 +0000 (+0200) Subject: hardcode location of ms2 syscall_table X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/ms2-kexec/commitdiff_plain/e750b7ef67f033fbf19fbcabd7dbe441f5fb501b?ds=sidebyside;hp=b105822f5c8a93a2151e1bb53b9de62848a421ef hardcode location of ms2 syscall_table --- diff --git a/kexec.c b/kexec.c index 8a437da..7989634 100644 --- a/kexec.c +++ b/kexec.c @@ -1459,13 +1459,17 @@ unsigned long **find_sys_call_table(void) { static int __init kexec_module_init(void) { -// sys_call_table=(void **)find_sys_call_table(); -// if(sys_call_table==NULL) { -// printk(KERN_ERR "Cannot find the system call address\n"); -// return -1; // do not load -// } + sys_call_table=(void **)find_sys_call_table(); + if(sys_call_table==NULL) { + printk(KERN_ERR "Cannot find the system call address\n"); + return -1; // do not load + } + + printk(KERN_INFO "kexec: Found sys_call_table at: %p\n", sys_call_table); - sys_call_table=(void **)0xc003d004; + //sys_call_table=(void **)0xc003d004; + sys_call_table=(void **)0xc00350c4; + printk(KERN_INFO "kexec: Force sys_call_table at: %p\n", sys_call_table); /* Set kexec_load() syscall. */ sys_call_table[__NR_kexec_load]=kexec_load;