Re: [PATCH RESEND v3 1/3] ptrace: pass type of a syscall-stop in ptrace_message

2018-11-26 Thread Dmitry V. Levin
On Tue, Nov 27, 2018 at 03:53:57AM +0100, Elvira Khabirova wrote: > On Mon, 26 Nov 2018 15:56:43 +0100, Oleg Nesterov wrote: > > On 11/25, Elvira Khabirova wrote: > > > > > > + * These values are stored in task->ptrace_message by > > > tracehook_report_syscall_* > > > + * to describe current sysca

Re: [PATCH RESEND v3 1/3] ptrace: pass type of a syscall-stop in ptrace_message

2018-11-26 Thread Elvira Khabirova
On Mon, 26 Nov 2018 15:56:43 +0100 Oleg Nesterov wrote: > On 11/25, Elvira Khabirova wrote: > > > > + * These values are stored in task->ptrace_message by > > tracehook_report_syscall_* > > + * to describe current syscall-stop. > > + * > > + * Values for these constants are chosen so that they d

Re: [PATCH RESEND v3 1/3] ptrace: pass type of a syscall-stop in ptrace_message

2018-11-26 Thread Oleg Nesterov
On 11/25, Elvira Khabirova wrote: > > + * These values are stored in task->ptrace_message by > tracehook_report_syscall_* > + * to describe current syscall-stop. > + * > + * Values for these constants are chosen so that they do not appear > + * in task->ptrace_message by other means. > + */ > +#de

Re: Re: [PATCH RESEND v3 1/3] ptrace: pass type of a syscall-stop in ptrace_message

2018-11-24 Thread Joey Pabalinas
On Sun, Nov 25, 2018 at 05:10:59AM +0300, Dmitry V. Levin wrote: > Given that without this patch the value returned by PTRACE_GETEVENTMSG > during syscall stop is undefined, we need two different ptrace_message > values that cannot be set by other ptrace events to enable reliable > identification o

Re: [PATCH RESEND v3 1/3] ptrace: pass type of a syscall-stop in ptrace_message

2018-11-24 Thread Dmitry V. Levin
On Sat, Nov 24, 2018 at 03:54:02PM -1000, Joey Pabalinas wrote: > On Sun, Nov 25, 2018 at 02:22:27AM +0100, Elvira Khabirova wrote: > > Define two constants, PTRACE_EVENTMSG_SYSCALL_ENTRY and > > PTRACE_EVENTMSG_SYSCALL_EXIT, and place them in ptrace_message > > for the duration of syscall-stops. >

Re: [PATCH RESEND v3 1/3] ptrace: pass type of a syscall-stop in ptrace_message

2018-11-24 Thread Joey Pabalinas
On Sun, Nov 25, 2018 at 02:22:27AM +0100, Elvira Khabirova wrote: > Define two constants, PTRACE_EVENTMSG_SYSCALL_ENTRY and > PTRACE_EVENTMSG_SYSCALL_EXIT, and place them in ptrace_message > for the duration of syscall-stops. > This way ptracers can distinguish syscall-enter-stops > from syscall-ex

[PATCH RESEND v3 1/3] ptrace: pass type of a syscall-stop in ptrace_message

2018-11-24 Thread Elvira Khabirova
Define two constants, PTRACE_EVENTMSG_SYSCALL_ENTRY and PTRACE_EVENTMSG_SYSCALL_EXIT, and place them in ptrace_message for the duration of syscall-stops. This way ptracers can distinguish syscall-enter-stops from syscall-exit-stops using PTRACE_GETEVENTMSG request. Signed-off-by: Elvira Khabirova