mirror of
https://github.com/sysprog21/lkmpg.git
synced 2024-11-22 04:54:20 +08:00
syscall: rename module name to syscall_steal
In Debian, the name syscall conflicts with this patch: in debian kernel source tree: debian/patches/features/x86/x86-make-x32-syscall-support-conditional.patch mailing list url: https://lore.kernel.org/lkml/1415245982.3398.53.camel@decadent.org.uk/T/#u which introduces a parameter named syscall.x32. So change our name.
This commit is contained in:
parent
3490cd7c41
commit
a60e84a060
|
@ -16,7 +16,7 @@ obj-m += print_string.o
|
|||
obj-m += kbleds.o
|
||||
obj-m += sched.o
|
||||
obj-m += chardev2.o
|
||||
obj-m += syscall.o
|
||||
obj-m += syscall_steal.o
|
||||
obj-m += intrpt.o
|
||||
obj-m += cryptosha256.o
|
||||
obj-m += cryptosk.o
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* syscall.c
|
||||
* syscall_steal.c
|
||||
*
|
||||
* System call "stealing" sample.
|
||||
*
|
||||
|
@ -206,7 +206,7 @@ static void disable_write_protection(void)
|
|||
__write_cr0(cr0);
|
||||
}
|
||||
|
||||
static int __init syscall_start(void)
|
||||
static int __init syscall_steal_start(void)
|
||||
{
|
||||
if (!(sys_call_table = acquire_sys_call_table()))
|
||||
return -1;
|
||||
|
@ -226,7 +226,7 @@ static int __init syscall_start(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void __exit syscall_end(void)
|
||||
static void __exit syscall_steal_end(void)
|
||||
{
|
||||
if (!sys_call_table)
|
||||
return;
|
||||
|
@ -246,7 +246,7 @@ static void __exit syscall_end(void)
|
|||
msleep(2000);
|
||||
}
|
||||
|
||||
module_init(syscall_start);
|
||||
module_exit(syscall_end);
|
||||
module_init(syscall_steal_start);
|
||||
module_exit(syscall_steal_end);
|
||||
|
||||
MODULE_LICENSE("GPL");
|
|
@ -1491,7 +1491,7 @@ $ sudo grep sys_call_table /proc/kallsyms
|
|||
ffffffff82000280 R x32_sys_call_table
|
||||
ffffffff820013a0 R sys_call_table
|
||||
ffffffff820023e0 R ia32_sys_call_table
|
||||
$ sudo insmod syscall.ko sym=0xffffffff820013a0
|
||||
$ sudo insmod syscall_steal.ko sym=0xffffffff820013a0
|
||||
\end{verbatim}
|
||||
|
||||
Using the address from \verb|/boot/System.map|, be careful about \verb|KASLR| (Kernel Address Space Layout Randomization).
|
||||
|
|
Loading…
Reference in New Issue
Block a user