[RFC PATCH RESEND v3 3/3] ptrace: add PTRACE_EVENT_SECCOMP support to PTRACE_GET_SYSCALL_INFO
Dmitry V. Levin
ldv at altlinux.org
Tue Nov 27 03:21:09 UTC 2018
On Tue, Nov 27, 2018 at 04:07:32AM +0100, Elvira Khabirova wrote:
> On Mon, 26 Nov 2018 15:35:24 +0100, Oleg Nesterov wrote:
> > On 11/25, Elvira Khabirova wrote:
> > >
> > > Extend PTRACE_GET_SYSCALL_INFO to support PTRACE_EVENT_SECCOMP stops.
> > > The information returned is the same as for syscall-enter-stops.
> >
> > Oh, this is not nice ;) there must be a better option, I hope... Plus
> >
> > Can't ptrace_get_syscall() check
> >
> > child->exit_code == (PTRACE_EVENT_SECCOMP << 8) | SIGTRAP;
> >
> > to detect the PTRACE_EVENT_SECCOMP case?
>
> Nope; looks like exit_code is zeroed after wait().
It's explicitly reset to zero in wait_task_stopped() unless WNOWAIT wait
option is set. When strace requests PTRACE_GET_SYSCALL_INFO after
wait4(), child->exit_code is already set to zero.
--
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20181127/c30c45d5/attachment.bin>
More information about the Strace-devel
mailing list