lkml.org 
[lkml]   [2018]   [Sep]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] arm64/ptrace: add PTRACE_SYSEMU and PTRACE_SYSEMU_SINGLESTEP support
Date
Am Montag, 3. September 2018, 18:31:03 CEST schrieb Will Deacon:
> On Mon, Sep 03, 2018 at 02:23:17PM +0800, Haibo.Xu wrote:
> > Add PTRACE_SYSEMU and PTRACE_SYSEMU_SINGLESTEP support on ARM64.
> > This copies the x86 semantics for invoking ptrace hooks, and have
> > been verified on ARM64 machine.
> >
> > Signed-off-by: Haibo.Xu <haibo.xu@arm.com>
> > Signed-off-by: Bin.Lu <bin.lu@arm.com>
> > ---
> > arch/arm64/include/asm/thread_info.h | 5 ++++-
> > arch/arm64/include/uapi/asm/ptrace.h | 2 ++
> > arch/arm64/kernel/ptrace.c | 17 +++++++++++++++++
> > 3 files changed, 23 insertions(+), 1 deletion(-)
>
> What is PTRACE_SYSEMU and what is its semantics? Why isn't it done in the
> core ptrace code?

It is an optimization added for UserModeLinux many years ago.
PTRACE_SYSEMU basically allows you to handle system calls in user space
without the kernel seeing them.
Before that UML had to render every system call into a no-op, e.h. getpid().
This was complicated and slow.

The ptrace() manpage has a section on PTRACE_SYSEMU, more documentation on the
semantics is not available.

And yes, I think this should also done in the core. Like many other ptrace() areas
this needs a cleanup. ;-)

I wonder what Haibo Xu want to do with PTRACE_SYSEMU on arm64.
Are you porting UML or gvisor to arm64?

Thanks,
//richard


\
 
 \ /
  Last update: 2018-09-03 18:41    [W:0.046 / U:2.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site