diff --git a/arch/x86/kernel/include/syscall_list.h b/arch/x86/kernel/include/syscall_list.h index 4bc9b2f0..77f8b6ec 100644 --- a/arch/x86/kernel/include/syscall_list.h +++ b/arch/x86/kernel/include/syscall_list.h @@ -55,6 +55,7 @@ SYSCALL_DELEGATED(79, getcwd) SYSCALL_DELEGATED(89, readlink) SYSCALL_DELEGATED(96, gettimeofday) SYSCALL_HANDLED(97, getrlimit) +SYSCALL_HANDLED(101, ptrace) SYSCALL_DELEGATED(102, getuid) SYSCALL_DELEGATED(104, getgid) SYSCALL_DELEGATED(107, geteuid) diff --git a/kernel/syscall.c b/kernel/syscall.c index 8535a222..9cd0244d 100644 --- a/kernel/syscall.c +++ b/kernel/syscall.c @@ -1858,6 +1858,17 @@ SYSCALL_DECLARE(getrlimit) return ret; } +SYSCALL_DECLARE(ptrace) +{ + const int request = ihk_mc_syscall_arg0(ctx); + const long pid = ihk_mc_syscall_arg1(ctx); + void * const addr = (void *)ihk_mc_syscall_arg2(ctx); + void * const data = (void *)ihk_mc_syscall_arg3(ctx); + + kprintf("ptrace(%d,%ld,%p,%p): ENOSYS\n", request, pid, addr, data); + return -ENOSYS; +} + SYSCALL_DECLARE(sched_setaffinity) { #if 0