From c0d07d326fee4914ff7cbd7cc87afd2d25931723 Mon Sep 17 00:00:00 2001 From: Edward Tomasz Napierala Date: Sun, 18 Oct 2020 15:56:47 +0000 Subject: [PATCH] Slightly tweak linux ptrace(2) debug message; no functional changes. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D26815 --- sys/amd64/linux/linux_ptrace.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sys/amd64/linux/linux_ptrace.c b/sys/amd64/linux/linux_ptrace.c index aab62e3793c..d36483854bd 100644 --- a/sys/amd64/linux/linux_ptrace.c +++ b/sys/amd64/linux/linux_ptrace.c @@ -71,6 +71,7 @@ __FBSDID("$FreeBSD$"); #define LINUX_PTRACE_GETSIGINFO 0x4202 #define LINUX_PTRACE_GETREGSET 0x4204 #define LINUX_PTRACE_SEIZE 0x4206 +#define LINUX_PTRACE_GET_SYSCALL_INFO 0x420e #define LINUX_PTRACE_EVENT_EXIT 6 @@ -557,6 +558,14 @@ linux_ptrace_seize(struct thread *td, pid_t pid, l_ulong addr, l_ulong data) return (EINVAL); } +static int +linux_ptrace_get_syscall_info(struct thread *td, pid_t pid, l_ulong addr, l_ulong data) +{ + + linux_msg(td, "PTRACE_GET_SYSCALL_INFO not implemented; returning EINVAL"); + return (EINVAL); +} + int linux_ptrace(struct thread *td, struct linux_ptrace_args *uap) { @@ -642,6 +651,9 @@ linux_ptrace(struct thread *td, struct linux_ptrace_args *uap) case LINUX_PTRACE_SEIZE: error = linux_ptrace_seize(td, pid, uap->addr, uap->data); break; + case LINUX_PTRACE_GET_SYSCALL_INFO: + error = linux_ptrace_get_syscall_info(td, pid, uap->addr, uap->data); + break; default: linux_msg(td, "ptrace(%ld, ...) not implemented; " "returning EINVAL", uap->req);