Re: [PATCH v2 6/6] arm64: ptrace: add support for syscall emulation

2019-03-18 Thread Haibo Xu (Arm Technology China)
On 2019/3/18 18:49, Sudeep Holla wrote: > Add PTRACE_SYSEMU and PTRACE_SYSEMU_SINGLESTEP support on arm64. > We can just make sure of the generic ptrace_syscall_enter hook to > support PTRACE_SYSEMU. We don't need any special handling for > PTRACE_SYSEMU_SINGLESTEP. This looks good to me. But it'd

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 +0000, 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

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 on

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 +0000, Haibo Xu (Arm Technology China) > wrote: >> On 2019/3/

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 +0000, 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 a

Re: [PATCH 4/6] powerpc: use common ptrace_syscall_enter hook to handle _TIF_SYSCALL_EMU

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 do_syscall_trace_enter. > > Cc: Oleg Nesterov > Cc: Paul Mackerras > Cc: M

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 2/6] ptrace: introduce ptrace_syscall_enter to consolidate PTRACE_SYSEMU handling

2019-03-04 Thread Haibo Xu (Arm Technology China)
On 2019/3/1 2:32, Sudeep Holla wrote: > Currently each architecture handles PTRACE_SYSEMU in very similar way. > It's completely arch independent and can be handled in the code helping > to consolidate PTRACE_SYSEMU handling. > > Let's introduce a hook 'ptrace_syscall_enter' that arch specific sysc