Re: [PATCH v3 3/6] syscall.h: introduce syscall_set_nr()

2025-01-28 Thread Dmitry V. Levin
On Tue, Jan 28, 2025 at 04:13:52PM +0100, Christophe Leroy wrote: > Le 28/01/2025 à 10:16, Dmitry V. Levin a écrit : > > Similar to syscall_set_arguments() that complements > > syscall_get_arguments(), introduce syscall_set_nr() > > that complements syscall_get_nr(). > > > > syscall_set_nr() is go

Re: [PATCH v3 2/6] syscall.h: add syscall_set_arguments() and syscall_set_return_value()

2025-01-28 Thread Dmitry V. Levin
On Tue, Jan 28, 2025 at 04:04:34PM +0100, Christophe Leroy wrote: > Le 28/01/2025 à 10:16, Dmitry V. Levin a écrit : > > These functions are going to be needed on all HAVE_ARCH_TRACEHOOK > > architectures to implement PTRACE_SET_SYSCALL_INFO API. > > The subject is misleading. syscall_set_return_v

Re: [PATCH v3 2/6] syscall.h: add syscall_set_arguments() and syscall_set_return_value()

2025-01-28 Thread Christophe Leroy
Le 28/01/2025 à 10:16, Dmitry V. Levin a écrit : These functions are going to be needed on all HAVE_ARCH_TRACEHOOK architectures to implement PTRACE_SET_SYSCALL_INFO API. The subject is misleading. syscall_set_return_value() already exists on most architectures and was not addressed by commi

Re: [PATCH v3 3/6] syscall.h: introduce syscall_set_nr()

2025-01-28 Thread Christophe Leroy
Le 28/01/2025 à 10:16, Dmitry V. Levin a écrit : Similar to syscall_set_arguments() that complements syscall_get_arguments(), introduce syscall_set_nr() that complements syscall_get_nr(). syscall_set_nr() is going to be needed along with syscall_set_arguments() on all HAVE_ARCH_TRACEHOOK archi

[PATCH v3 3/6] syscall.h: introduce syscall_set_nr()

2025-01-28 Thread Dmitry V. Levin
Similar to syscall_set_arguments() that complements syscall_get_arguments(), introduce syscall_set_nr() that complements syscall_get_nr(). syscall_set_nr() is going to be needed along with syscall_set_arguments() on all HAVE_ARCH_TRACEHOOK architectures to implement PTRACE_SET_SYSCALL_INFO API. S

[PATCH v3 2/6] syscall.h: add syscall_set_arguments() and syscall_set_return_value()

2025-01-28 Thread Dmitry V. Levin
These functions are going to be needed on all HAVE_ARCH_TRACEHOOK architectures to implement PTRACE_SET_SYSCALL_INFO API. This partially reverts commit 7962c2eddbfe ("arch: remove unused function syscall_set_arguments()") by reusing some of old syscall_set_arguments() implementations. Signed-off-

[PATCH v3 0/6] ptrace: introduce PTRACE_SET_SYSCALL_INFO API

2025-01-28 Thread Dmitry V. Levin
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 im