We added a system call to modify idt table, then programed it in modify_idt.c

1. Put our modify_idt.c file in /usr/src/linux-3.10.15/arch/x86/kernel

2. /usr/src/linux-3.10.15/arch/x86/syscalls# vim syscall_64.tbl

 add a new line

314     64      modify_idt              sys_modify_idt

3. Add the prototype of our system call in

/usr/src/linux-3.10.15/include/linux/syscalls.h

asmlinkage long sys_modify_idt(int i);

4. Add the file to the Makefile in /usr/src/linux-3.10.15/arch/x86/kernel/Makefile by

adding modify_idt.o to the list in obj-y += ...

obj-y                   := process_$(BITS).o signal.o entry_$(BITS).o
obj-y                   += traps.o irq.o irq_$(BITS).o dumpstack_$(BITS).o

obj-y                   += modify_idt.o    // adding this one

5. Do not forget to recompile & reload the kernel before testing!

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-31
  • 2022-12-23
  • 2021-09-07
  • 2022-12-23
  • 2021-11-22
  • 2021-07-26
猜你喜欢
  • 2021-10-13
  • 2022-12-23
  • 2021-04-05
  • 2022-12-23
  • 2021-05-15
  • 2022-02-08
  • 2021-11-01
相关资源
相似解决方案