Skip to contentSkip to conversation

ptrace.2: Add details about usage of PTRACE_GET_SYSCALL_INFO

PATCH In review Fotios Valasiadis 2 participants 4 messages Feb 25, 2023 Man-pages: manual pages for Linux -- Sections 2, 3, 4, 5, and 7

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ptrace.2: Add details about usage of PTRACE_GET_SYSCALL_INFO

Fixed incomplete doc. PTRACE_GET_SYSCALL_INFO wouldn't inform the user that they need to enable PTRACE_O_TRACESYSGOOD to get detailed information from said operation.

---
 man2/ptrace.2 | 9 +++++++++
 1 file changed, 9 insertions(+)
man2/ptrace.2 +9 -0
index 55d9fd36d..ad0543b0b 100644
@@ -1111,6 +1111,15 @@ stop.
 .B PTRACE_SYSCALL_INFO_NONE
 No component of the union contains relevant information.
 .RE
+.IP
+Note that in case of
+syscall entry or exit stops, the data returned by
+.B PTRACE_GET_SYSCALL_INFO
+is limited to type
+.B PTRACE_SYSCALL_INFO_NONE
+unless
+.B PTRACE_O_TRACESYSGOOD
+option is set before the corresponding ptrace stop has occurred.
 .\"
 .SS Death under ptrace
 When a (possibly multithreaded) process receives a killing signal
Signature · 1 line
2.39.2
#1 lore raw
Quoted 1 line · Fotios Valasiadis

Fixed incomplete doc. PTRACE_GET_SYSCALL_INFO wouldn't inform the user that they need to enable PTRACE_O_TRACESYSGOOD to get detailed information from said operation.

I'm not sure about the word "fix" in this context as we are not correcting some wrong information but simply extending the documentation.

How about the following wording:

Document the role of PTRACE_O_TRACESYSGOOD option in connection with PTRACE_GET_SYSCALL_INFO.

Quoted 2 lines

Feel free to add
Complements: fc91449cb "ptrace.2: Document PTRACE_GET_SYSCALL_INFO"

Quoted 26 lines
---
 man2/ptrace.2 | 9 +++++++++
 1 file changed, 9 insertions(+)
man2/ptrace.2 +9 -0
index 55d9fd36d..ad0543b0b 100644
@@ -1111,6 +1111,15 @@ stop.
 .B PTRACE_SYSCALL_INFO_NONE
 No component of the union contains relevant information.
 .RE
+.IP
+Note that in case of
+syscall entry or exit stops, the data returned by
+.B PTRACE_GET_SYSCALL_INFO
+is limited to type
+.B PTRACE_SYSCALL_INFO_NONE
+unless
+.B PTRACE_O_TRACESYSGOOD
+option is set before the corresponding ptrace stop has occurred.
 .\"
 .SS Death under ptrace
 When a (possibly multithreaded) process receives a killing signal
Signature · 1 line
2.39.2
Signature · 1 line
ldv
#2 lore raw
Quoted 7 lines · Dmitry V . Levin

I'm not sure about the word "fix" in this context as we are not correcting some wrong information but simply extending the documentation.

How about the following wording:

Document the role of PTRACE_O_TRACESYSGOOD option in connection with PTRACE_GET_SYSCALL_INFO.

Sure! Do I use Cowritten-by, Acked-by or Reviewed-by?

#3 lore raw
Quoted 10 lines · Φώτης Βαλασιάδης
Quoted 7 lines · Dmitry V . Levin

I'm not sure about the word "fix" in this context as we are not correcting some wrong information but simply extending the documentation.

How about the following wording:

Document the role of PTRACE_O_TRACESYSGOOD option in connection with PTRACE_GET_SYSCALL_INFO.

Sure! Do I use Cowritten-by, Acked-by or Reviewed-by?

Cowritten-by seems to suit better in this case.

Signature · 1 line
ldv