aboutsummaryrefslogtreecommitdiffstats
path: root/man2/getitimer.2
diff options
context:
space:
mode:
authorFotios Valasiadis <fvalasiad@gmail.com>2023-02-27 21:17:31 +0200
committerAlejandro Colomar <alx@kernel.org>2023-03-01 21:57:21 +0100
commitb2a916b48219db3ce744b991425fbae1fb7a3baf (patch)
tree958790e4cad0344e899f4b023cdfbc0d09f250d8 /man2/getitimer.2
parent53a7e5dfc3554a2e8dbdfdc4504e99652e1d6382 (diff)
downloadman-pages-b2a916b48219db3ce744b991425fbae1fb7a3baf.tar.gz
ptrace.2: Add details about usage of PTRACE_GET_SYSCALL_INFO
Document the role of PTRACE_O_TRACESYSGOOD option in connection with PTRACE_GET_SYSCALL_INFO. Came upon this after writing a test program using PTRACE_GET_SYSCALL_INFO. After failing to find what's wrong I posted a StackOverflow question which you can find right here: <https://stackoverflow.com/questions/72410182/ptrace-get-syscall-info-always-returns-info-op-as-ptrace-syscall-info-none> Nate Eldredge found out what happens by looking into the kernel's source code, here is a link to the relevant part <https://github.com/torvalds/linux/blob/8291eaafed36f575f23951f3ce18407f480e9ecf/kernel/ptrace.c#L1018> In the code it can be seen that in case of system call entry or exit stops, the union is filled if and only if the signal matches `SIGTRAP | 0x80`, a signal which is only sent if the PTRACE_O_TRACESYSGOOD option is set. You can read about that in the PTRACE_O_TRACESYSGOOD section of ptrace(2)'s manual. Complements: fc91449cb "ptrace.2: Document PTRACE_GET_SYSCALL_INFO" Cowritten-by: Dmitry V. Levin <ldv@strace.io> Signed-off-by: Dmitry V. Levin <ldv@strace.io> Signed-off-by: Fotios Valasiadis <fvalasiad@gmail.com> Acked-by: Nate Eldredge <nate@thatsmathematics.com> Cc: Elvira Khabirova <lineprinter0@gmail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
Diffstat (limited to 'man2/getitimer.2')
0 files changed, 0 insertions, 0 deletions