[PATCH 3/6] x86: clean up _TIF_SYSCALL_EMU handling using ptrace_syscall_enter hook

2019-02-28 Thread Sudeep Holla
Now that we have a new hook ptrace_syscall_enter that can be called from syscall entry code and it handles PTRACE_SYSEMU in generic code, we can do some cleanup using the same in syscall_trace_enter. Further the extra logic to find single stepping PTRACE_SYSEMU_SINGLESTEP in syscall_slow_exit_work

Re: [PATCH 3/6] x86: clean up _TIF_SYSCALL_EMU handling using ptrace_syscall_enter hook

2019-03-11 Thread Haibo Xu (Arm Technology China)
On 2019/3/12 2:34, Sudeep Holla wrote: > (I thought I had sent this email, last Tuesday itself, but saw this in my > draft today, something went wrong, sorry for the delay) > > On Tue, Mar 05, 2019 at 02:14:47AM +, Haibo Xu (Arm Technology China) > wrote: >> On 2019/3/4 18:12, Sudeep Holla wro

Re: [PATCH 3/6] x86: clean up _TIF_SYSCALL_EMU handling using ptrace_syscall_enter hook

2019-03-11 Thread Andy Lutomirski
On Mon, Mar 11, 2019 at 6:35 PM Haibo Xu (Arm Technology China) wrote: > > On 2019/3/12 2:34, Sudeep Holla wrote: > > (I thought I had sent this email, last Tuesday itself, but saw this in my > > draft today, something went wrong, sorry for the delay) > > > > On Tue, Mar 05, 2019 at 02:14:47AM +00

Re: [PATCH 3/6] x86: clean up _TIF_SYSCALL_EMU handling using ptrace_syscall_enter hook

2019-03-12 Thread Sudeep Holla
On Tue, Mar 12, 2019 at 01:34:44AM +, Haibo Xu (Arm Technology China) wrote: > On 2019/3/12 2:34, Sudeep Holla wrote: > > (I thought I had sent this email, last Tuesday itself, but saw this in my > > draft today, something went wrong, sorry for the delay) > > > > On Tue, Mar 05, 2019 at 02:14:

Re: [PATCH 3/6] x86: clean up _TIF_SYSCALL_EMU handling using ptrace_syscall_enter hook

2019-03-12 Thread Sudeep Holla
On Mon, Mar 11, 2019 at 08:04:39PM -0700, Andy Lutomirski wrote: > On Mon, Mar 11, 2019 at 6:35 PM Haibo Xu (Arm Technology China) > wrote: > > [...] > > For the PTRACE_SYSEMU_SINGLESTEP request, ptrace only need to report(send > > SIGTRAP) at the entry of a system call, no need to report at the

Re: [PATCH 3/6] x86: clean up _TIF_SYSCALL_EMU handling using ptrace_syscall_enter hook

2019-03-12 Thread Haibo Xu (Arm Technology China)
On 2019/3/12 20:09, Sudeep Holla wrote: > On Mon, Mar 11, 2019 at 08:04:39PM -0700, Andy Lutomirski wrote: >> On Mon, Mar 11, 2019 at 6:35 PM Haibo Xu (Arm Technology China) >> wrote: >>> > > [...] > >>> For the PTRACE_SYSEMU_SINGLESTEP request, ptrace only need to report(send >>> SIGTRAP) at the

Re: [PATCH 3/6] x86: clean up _TIF_SYSCALL_EMU handling using ptrace_syscall_enter hook

2019-03-14 Thread Sudeep Holla
On Wed, Mar 13, 2019 at 01:03:18AM +, Haibo Xu (Arm Technology China) wrote: [...] > Since ptrace() system call do have so many request type, I'm not sure > whether the test cases have covered all of that. But here we'd better make > sure the PTRACE_SYSEMU and PTRACE_SYSEMU_SINGLESTEP requests

Re: [PATCH 3/6] x86: clean up _TIF_SYSCALL_EMU handling using ptrace_syscall_enter hook

2019-03-14 Thread Haibo Xu (Arm Technology China)
On 2019/3/14 18:51, Sudeep Holla wrote: > On Wed, Mar 13, 2019 at 01:03:18AM +, Haibo Xu (Arm Technology China) > wrote: > [...] > >> Since ptrace() system call do have so many request type, I'm not sure >> whether the test cases have covered all of that. But here we'd better make >> sure the

Re: [PATCH 3/6] x86: clean up _TIF_SYSCALL_EMU handling using ptrace_syscall_enter hook

2019-03-02 Thread Andy Lutomirski
On Thu, Feb 28, 2019 at 10:32 AM Sudeep Holla wrote: > > Now that we have a new hook ptrace_syscall_enter that can be called from > syscall entry code and it handles PTRACE_SYSEMU in generic code, we > can do some cleanup using the same in syscall_trace_enter. > > Further the extra logic to find s

Re: [PATCH 3/6] x86: clean up _TIF_SYSCALL_EMU handling using ptrace_syscall_enter hook

2019-03-04 Thread Haibo Xu (Arm Technology China)
On 2019/3/1 2:32, Sudeep Holla wrote: > Now that we have a new hook ptrace_syscall_enter that can be called from > syscall entry code and it handles PTRACE_SYSEMU in generic code, we > can do some cleanup using the same in syscall_trace_enter. > > Further the extra logic to find single stepping PTR

Re: [PATCH 3/6] x86: clean up _TIF_SYSCALL_EMU handling using ptrace_syscall_enter hook

2019-03-04 Thread Sudeep Holla
On Sat, Mar 02, 2019 at 05:11:40PM -0800, Andy Lutomirski wrote: > On Thu, Feb 28, 2019 at 10:32 AM Sudeep Holla wrote: > > > > Now that we have a new hook ptrace_syscall_enter that can be called from > > syscall entry code and it handles PTRACE_SYSEMU in generic code, we > > can do some cleanup u

Re: [PATCH 3/6] x86: clean up _TIF_SYSCALL_EMU handling using ptrace_syscall_enter hook

2019-03-04 Thread Sudeep Holla
On Mon, Mar 04, 2019 at 08:25:28AM +, Haibo Xu (Arm Technology China) wrote: > On 2019/3/1 2:32, Sudeep Holla wrote: > > Now that we have a new hook ptrace_syscall_enter that can be called from > > syscall entry code and it handles PTRACE_SYSEMU in generic code, we > > can do some cleanup using

Re: [PATCH 3/6] x86: clean up _TIF_SYSCALL_EMU handling using ptrace_syscall_enter hook

2019-03-04 Thread Haibo Xu (Arm Technology China)
On 2019/3/4 18:12, Sudeep Holla wrote: > On Mon, Mar 04, 2019 at 08:25:28AM +, Haibo Xu (Arm Technology China) > wrote: >> On 2019/3/1 2:32, Sudeep Holla wrote: >>> Now that we have a new hook ptrace_syscall_enter that can be called from >>> syscall entry code and it handles PTRACE_SYSEMU in g

Re: [PATCH 3/6] x86: clean up _TIF_SYSCALL_EMU handling using ptrace_syscall_enter hook

2019-03-11 Thread Sudeep Holla
(I thought I had sent this email, last Tuesday itself, but saw this in my draft today, something went wrong, sorry for the delay) On Tue, Mar 05, 2019 at 02:14:47AM +, Haibo Xu (Arm Technology China) wrote: > On 2019/3/4 18:12, Sudeep Holla wrote: > > On Mon, Mar 04, 2019 at 08:25:28AM +,