public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ulrich Drepper <drepper@redhat.com>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: Roland McGrath <roland@redhat.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] i386 vsyscall DSO implementation
Date: Sat, 26 Apr 2003 10:15:37 -0700	[thread overview]
Message-ID: <3EAABEB9.3030404@redhat.com> (raw)
In-Reply-To: <200304250110.h3P1Aoo02525@magilla.sf.frob.com>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

- From what I've read here so far there were no objections.  The only
comments were to list the pages in /proc/*/maps and somehow make the DSO
available as a real file in the filesystem.

The first I think is reasonable.  But it is orthogonal to this patch.
It applies as well to the code currently in the kernel.  I'm pretty sure
we can arrange this to happen but it doesn't have to be in this patch.

As for the second, I do not think this is a good idea at all.  In theory
there could be more then one such DSO in use.  Without looking at the
actual process' address space it is not possible to determine which one
is used.  Roland also has IIRC a patch for ptrace() which allows it to
access the vsyscall page.  This is the method you'll have to apply.
Your remote debugger will in any case have to use ptrace(), so this is
no new requirement.

The fake kernel DSO will indeed be visible through the
_dl_iterate_phdr() function.  This means programs have easy access to it.


And a few more points on the DSO solution:

+ since the DSO is build just like an ordinary userlevel DSO there is
  no problem with writing the code which goes into it in C.  It is
  not necessary to do what is necessary for the current functions.

+ the DSO method allows to introduce new kernel interfaces which do
  not require new syscalls.  Well, somehow the kernel must be entered
  but how this happens is not visible to the user code.  This could
  mean using a syscall but the actual syscall number changes with
  every release.

+ the mechanism can easily be transferred to other architectures.  It
  could in theory mean using syscall numbers as the kernel interface
  can be abandoned.  Syscalls would be indentified by name at runtime
  (which is, I think, what most people think is the right solution).
  This has a slight runtime impact but it could be almost reduced to
  nil (maybe prelink is already capable of doing this).


Having said this, Linus, could you apply the patch if you have no
objections so that we can move on and add the remaining pieces?

- -- 
- --------------.                        ,-.            444 Castro Street
Ulrich Drepper \    ,-----------------'   \ Mountain View, CA 94041 USA
Red Hat         `--' drepper at redhat.com `---------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+qr652ijCOnn/RHQRAoZEAKCJ3D39tZubMFK+NBdoIHsixF3qhgCeMM/o
+IA3Hu+EMdNA+UYI4jlG6ys=
=ENqC
-----END PGP SIGNATURE-----


      parent reply	other threads:[~2003-04-26 17:04 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-25  1:10 [PATCH] i386 vsyscall DSO implementation Roland McGrath
2003-04-25  1:49 ` Jeff Garzik
2003-04-25  2:10   ` Roland McGrath
2003-04-25 16:21     ` David Mosberger
2003-04-25 21:00       ` H. Peter Anvin
2003-04-25 21:17         ` David Mosberger
2003-04-25 21:20           ` H. Peter Anvin
2003-04-25 21:50             ` David Mosberger
2003-04-26 22:06       ` Roland McGrath
2003-04-26 17:15 ` Ulrich Drepper [this message]

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=3EAABEB9.3030404@redhat.com \
    --to=drepper@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=roland@redhat.com \
    --cc=torvalds@transmeta.com \
    /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