Rice University logo
 
Top blue bar image
 

Adding a system call to AArch64 Linux

No more calls.S. It becomes simpler to add a new syscall.

  1. kernel/include/linux/syscalls.h
    Define the syscall:
    asmlinkage long sys_hong(int k);
  2. implement it somewere.c
  3. kernel/include/uapi/asm-generic/unistd.h
    Link the syscall with a number. Don’t forget update __NR_syscalls accordingly.
    e.g.,
    #define __NR_hong 291
    __SYSCALL(__NR_hong, sys_hong)
    #define __NR_syscalls 292

 

 

Comments are closed.