실험실 (커널 오류)
[kernel build] System Call 추가하기 오류기록(02/19)
telomere37
2021. 2. 19. 00:50
1차 시도
include/linux/syscalls.h --> +unsigned long how_many_syscall;
arch/x86/kernel/cpu/common.c --> +how_many_syscall=0;
arch/x86/entry/common.c --> +how_many_syscall++;
hello/hello.c --> +printk("The total amount of system calls called is %lu\n",how_many_syscall);
이유:
system call이 몇번 불렸는지 count하는 변수를 선언,초기화,증가 시키며
hello라는 syscall에서 값을 출력한다.
실패: 'syscall_init'에서 how_many_syscall 인지를 못 함
2차 시도
arch/x86/kernel/cpu/common.c --> -how_many_syscall=0;
이유:
실패: