Re: [PATCH] ptrace.2: document PTRACE_GET_SYSCALL_INFO

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Dmitry,

On 9/2/19 2:38 PM, Dmitry V. Levin wrote:
> PTRACE_GET_SYSCALL_INFO request was introduced by Linux kernel commit
> 201766a20e30f982ccfe36bebfad9602c3ff574a aka v5.3-rc1~65^2~23.
> 
> Signed-off-by: Dmitry V. Levin <ldv@xxxxxxxxxxxx>
> ---
>  man2/ptrace.2 | 21 +++++++++++++++++++++
>  1 file changed, 21 insertions(+)
> 
> diff --git a/man2/ptrace.2 b/man2/ptrace.2
> index 8b8daf238..3b774f87b 100644
> --- a/man2/ptrace.2
> +++ b/man2/ptrace.2
> @@ -1005,6 +1005,27 @@ of the
>  .IR "struct user_desc"
>  is ignored; in other words,
>  this ptrace operation can't be used to allocate a free TLS entry.)
> +.TP
> +.BR PTRACE_GET_SYSCALL_INFO " (since Linux 5.3)"
> +.\" commit 201766a20e30f982ccfe36bebfad9602c3ff574a
> +Retrieve information about the syscall that caused the stop.
> +The information is placed into the buffer pointed by
> +.I data
> +argument, which should be a pointer to a buffer of type
> +.IR "struct ptrace_syscall_info" .
> +The
> +.I addr
> +argument contains the size of the buffer pointed to
> +by
> +.I data
> +argument (i.e.,
> +.IR "sizeof(struct ptrace_syscall_info)" ).
> +The return value contains the number of bytes available
> +to be written by the kernel.
> +If the size of data to be written by the kernel exceeds the size
> +specified by
> +.I addr
> +argument, the output is truncated.
>  .\"
>  .SS Death under ptrace
>  When a (possibly multithreaded) process receives a killing signal

Thanks for this patch. I've applied, tweaked the wording very
slightly, and pushed.

However, this patch lacks an important piece: documentation of
'struct ptrace_syscall_info'. I could take a shot at this, but 
I see you already wrote a test program for this ptrace operation. 
Would you be willing to add a patch that documents the structure?

Thanks,

Michael

-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/



[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux