Re: [PATCH v3 5/6] ptrace: introduce PTRACE_SET_SYSCALL_INFO request
From: Dmitry V. Levin <hidden>
Date: 2025-01-28 15:58:14
Also in:
lkml
From: Dmitry V. Levin <hidden>
Date: 2025-01-28 15:58:14
Also in:
lkml
On Tue, Jan 28, 2025 at 04:21:13PM +0100, Christophe Leroy wrote:
Le 28/01/2025 à 10:16, Dmitry V. Levin a écrit :quoted
PTRACE_SET_SYSCALL_INFO is a generic ptrace API that complements PTRACE_GET_SYSCALL_INFO by letting the ptracer modify details of system calls the tracee is blocked in. This API allows ptracers to obtain and modify system call details in a straightforward and architecture-agnostic way. Current implementation supports changing only those bits of system call information that are used by strace, namely, syscall number, syscall arguments, and syscall return value.How do you handle changes related to syscalls that call force_successful_syscall_return() ?
I don't see why these syscalls would need any special treatment. If a tracer wants to set an error status for a syscall that cannot return an error, it's up to the tracer to face the consequences. Tracers can do it now via PTRACE_SETREGS* anyway. -- ldv