mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: renzo@cs.unibo.it (Renzo Davoli)
To: Ulrich Drepper <drepper@gmail.com>
Cc: Andi Kleen <ak@suse.de>, osd@cs.unibo.it, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] 2-ptrace_multi
Date: Fri, 19 May 2006 11:07:26 +0200	[thread overview]
Message-ID: <20060519090726.GA11789@cs.unibo.it> (raw)
In-Reply-To: <a36005b50605181923k285b4d50y30d6b43baede95ca@mail.gmail.com>

On Thu, May 18, 2006 at 07:23:13PM -0700, Ulrich Drepper wrote:
> On 5/18/06, Renzo Davoli <renzo@cs.unibo.it> wrote:
> >e.g. To virtualize a write you'd have to call PTRACE_PEEKDATA for each
> >word of the buffer, very many hundreds cycles lost.
> 
> No, this is not how programs should do it.  Just open /proc/PID/mem
> and use pread() with an offset corresponding to the address.  Now,
> repeat your timings using this technique.

That would be faster to access the memory but:
- the manager has to keep one open file per controlled process
- when the Virtual Machine manager has to access the ptraced memory and 
access its registers and finally restart the process, needs three system 
calls instead of just one. (one pread/pwrite to /proc/PID/mem + at least one
ptrace PEEK/POKEUSR and a ptrace SYSCALL or SYSVM).
For a Virtual Machine manager three syscalls instead of one makes the
difference. The gap will be not so large with respect to the figures
of my previous message but there will be for sure.
- the read/write of several words of memory using ptrace do exist
implemented in an horribly tricky way for sparc/sparc64 (addr2 is taken 
out from a register as an extra argument which is not part of ptrace 
definition, see arch/sparc/kernel/ptrace.c). Our proposal gives also a 
clean and efficient and general interface for the same feature.

renzo

  reply	other threads:[~2006-05-19  9:07 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-18 15:53 ptrace enhancements for VM support (patch proposals follow in sep.msgs) Renzo Davoli
2006-05-18 15:56 ` [PATCH] 1-access_process_vm_user Renzo Davoli
2006-05-18 15:58 ` [PATCH] 2-ptrace_multi Renzo Davoli
2006-05-18 20:17   ` Andi Kleen
2006-05-18 21:13     ` Renzo Davoli
2006-05-19  2:23       ` Ulrich Drepper
2006-05-19  9:07         ` Renzo Davoli [this message]
2006-05-19 13:09           ` Daniel Jacobowitz
2006-05-19 17:45             ` Renzo Davoli
2006-05-19 19:15               ` Renzo Davoli
2006-05-19 20:15               ` Daniel Jacobowitz
2006-05-19 20:17                 ` Andi Kleen
2006-05-20  6:44                   ` Ulrich Drepper
2006-05-20 14:37                   ` Alan Cox
2006-05-20 18:30                     ` Renzo Davoli
2006-05-20 20:23                       ` Ulrich Drepper
2006-05-20 21:39                       ` Jeff Dike
2006-05-21 12:38                         ` Avi Kivity
2006-05-21 15:28                         ` Renzo Davoli
2006-05-22 13:02                           ` Daniel Jacobowitz
2006-05-22 15:05                             ` Renzo Davoli
2006-05-22 15:26                               ` Daniel Jacobowitz
2006-05-18 16:07 ` [PATCH] 3-ptrace_vm Renzo Davoli
2006-05-21  8:03 ` ptrace enhancements for VM support (patch proposals follow in sep.msgs) Peter Chubb

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060519090726.GA11789@cs.unibo.it \
    --to=renzo@cs.unibo.it \
    --cc=ak@suse.de \
    --cc=drepper@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=osd@cs.unibo.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®