From: Dmitry V. Levin Date: Thu, 12 May 2016 15:03:58 +0000 (+0000) Subject: ptrace: do not print arguments of PTRACE_TRACEME request X-Git-Tag: v4.12~182 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=89ca4aa1403daf93284325596e2e4a8fc3bc07ff;p=strace ptrace: do not print arguments of PTRACE_TRACEME request As kernel ignores arguments of PTRACE_TRACEME request, we do not print them either. * process.c (SYS_FUNC(ptrace)): If request is PTRACE_TRACEME, return early with RVAL_DECODED. --- diff --git a/process.c b/process.c index b2dfac19..f53c12e0 100644 --- a/process.c +++ b/process.c @@ -91,6 +91,11 @@ SYS_FUNC(ptrace) /* request */ printxval64(ptrace_cmds, request, "PTRACE_???"); + if (request == PTRACE_TRACEME) { + /* pid, addr, and data are ignored. */ + return RVAL_DECODED; + } + /* pid */ tprintf(", %d, ", pid);