linux-um archives
 help / color / mirror / Atom feed
* [uml-devel] [PATCH] RFC allow PTRACE_SYSCALL to selectively skip syscalls
@ 2006-05-13 17:40 Steven James
  2006-05-16 15:10 ` Jeff Dike
  2006-05-17  6:20 ` Blaisorblade
  0 siblings, 2 replies; 9+ messages in thread
From: Steven James @ 2006-05-13 17:40 UTC (permalink / raw)
  To: User-mode-linux-devel

Greetings,

I have been working on a few experimental system calls using a ptrace
mechanism similar to UML to implement the calls. Naturally this lead me to
look at PTRACE_SYSEMU vs. PTRACE_SYSCALL. Since the extra system calls are
implemented entirely by the ptrace thread it seems a shame to take the
context switch on entry and exit from the call. In some cases, I need to
also implement a few of the standard Linux kernel calls in the ptrace
thread as well, based on parameters of the call (for example, writes to
specific open files).

The patch below for x86_64 implements a scheme where a ptraced system call
is skipped if the ptrace thread sets a return value (in RAX) when it
handles the syscall entry. Otherwise things proceed normally.

A similar change is even easier on i386 since the needed logic is already
in entry.S for SYSEMU.

I chose changing RAX as the trigger since that is otherwise a useless
thing for a tracing thread to do at syscall entry.

G'day,
sjames


||||| |||| |||||||||||||  |||
by Linux Labs International, Inc.
   Steven James, CTO

55 Marietta Street
Suite 1830
Atlanta, Ga 30303
866 824 9737 support



-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2006-05-22  9:15 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-13 17:40 [uml-devel] [PATCH] RFC allow PTRACE_SYSCALL to selectively skip syscalls Steven James
2006-05-16 15:10 ` Jeff Dike
2006-05-16 17:45   ` Steven James
2006-05-17  6:20 ` Blaisorblade
2006-05-17 14:45   ` Steven James
2006-05-19 14:09     ` Blaisorblade
2006-05-21 17:36       ` Blaisorblade
2006-05-21 23:58         ` Steven James
2006-05-22  9:15           ` Blaisorblade

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox