Skip to content

Latest commit

 

History

History
36 lines (29 loc) · 3.41 KB

README.md

File metadata and controls

36 lines (29 loc) · 3.41 KB

Linux Kernel Lab

  1. basic module_init, module_exit usage
  2. module parameters
  3. read-only proc file
  4. read-writable proc file

Add scheduling counter by modifying the kernel and recompile it

  1. add counter variable in struct task_struct in include/linux/sched.h
  2. initialize the counter (set to 0) in kernel_clone() in kernel/fork.c
  3. increase the counter by 1 in activate_task() in kernel/sched/core.c
  4. create a entry in tgid_base_stuff[] in fs/proc/base.c

See https://nickchen120235.github.io/2021/04/22/linux-kernel-scheduling.html for more details

Three memory management-related functionalities implemented for both x86 and aarch64 architectures

  • listvma: print all virtual addresses of all processes in the format of start-addr end-addr permission
  • findpage addr: print the corresponding physical address of virtual address addr. If no such translation exists, print translation not found
  • writeval addr val: try to write val to addr

See https://nickchen120235.github.io/2021/05/18/linux-kernel-memory-management.html for more details

Modify romfs implementation to accomplish the following functionalities

Two methods for hooking