diff options
author | Konstantin Belousov <kib@FreeBSD.org> | 2022-11-30 08:45:52 +0000 |
---|---|---|
committer | Konstantin Belousov <kib@FreeBSD.org> | 2022-12-22 21:11:35 +0000 |
commit | 140ceb5d956bb8795a77c23d3fd5ef047b0f3c68 (patch) | |
tree | 05ffff78b30917b50409f9816aaeccb44ce54585 /sys/sys/ptrace.h | |
parent | 0e07241c372d7352537a4a786c96a580a721be3c (diff) | |
download | src-140ceb5d956bb8795a77c23d3fd5ef047b0f3c68.tar.gz src-140ceb5d956bb8795a77c23d3fd5ef047b0f3c68.zip |
ptrace(2): add PT_SC_REMOTE remote syscall request
Reviewed by: markj
Discussed with: jhb
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D37590
Diffstat (limited to 'sys/sys/ptrace.h')
-rw-r--r-- | sys/sys/ptrace.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sys/sys/ptrace.h b/sys/sys/ptrace.h index 80797f290a41..94d09eac95b1 100644 --- a/sys/sys/ptrace.h +++ b/sys/sys/ptrace.h @@ -87,6 +87,7 @@ #define PT_VM_ENTRY 41 /* Get VM map (entry) */ #define PT_GETREGSET 42 /* Get a target register set */ #define PT_SETREGSET 43 /* Set a target register set */ +#define PT_SC_REMOTE 44 /* Execute a syscall */ #define PT_FIRSTMACH 64 /* for machine-specific requests */ #include <machine/ptrace.h> /* machine-specific requests, if any */ @@ -192,8 +193,17 @@ struct ptrace_coredump { #define PC_COMPRESS 0x00000001 /* Allow compression */ #define PC_ALL 0x00000002 /* Include non-dumpable entries */ +struct ptrace_sc_remote { + struct ptrace_sc_ret pscr_ret; + u_int pscr_syscall; + u_int pscr_nargs; + syscallarg_t *pscr_args; +}; + #ifdef _KERNEL +#include <sys/proc.h> + struct thr_coredump_req { struct vnode *tc_vp; /* vnode to write coredump to. */ off_t tc_limit; /* max coredump file size. */ @@ -201,6 +211,12 @@ struct thr_coredump_req { int tc_error; /* request result */ }; +struct thr_syscall_req { + struct ptrace_sc_ret ts_ret; + u_int ts_nargs; + struct syscall_args ts_sa; +}; + int ptrace_set_pc(struct thread *_td, unsigned long _addr); int ptrace_single_step(struct thread *_td); int ptrace_clear_single_step(struct thread *_td); |