Skip to content

nickchen120235/linux-kernel-lab

Repository files navigation

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

About

2020 fall Linux kernel course lab

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published