public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: caglar@pardus.org.tr, LKML <linux-kernel@vger.kernel.org>,
	virtualization <virtualization@lists.linux-foundation.org>
Subject: Re: [PATCH] Remove -static from Documentation/lguest/Makefile
Date: Sun, 22 Jul 2007 21:09:33 +1000	[thread overview]
Message-ID: <1185102573.6344.95.camel@localhost.localdomain> (raw)
In-Reply-To: <46A0D720.9000204@goop.org>

On Fri, 2007-07-20 at 08:39 -0700, Jeremy Fitzhardinge wrote:
> Rusty Russell wrote:
> > How's this?
> > ===
> > Link lguest example launcher non-static
> >
> > S.Caglar Onur points out that many distributions don't ship a static
> > zlib.  Unfortunately the launcher currently maps virtual device memory
> > where shared libraries want to go.
>
> The technique I used in Valgrind was to have a small core program which
> links up high, which then uses mmap to reserve all the client (guest)
> address space, and then dlopens any other libraries, which are
> guaranteed to be loaded high.
> 
> There are a number of subtleties, of course.  You need to make the
> initial stub static, but some versions of glibc have difficulties with
> having static programs use dlopen.  And it means you need to use dlsym
> and do all your library function accesses indirectly, which may not be a
> problem for a relatively simple library like libz.

The other option is to simply mmap the memory and device descriptors,
then tell the kernel the offset.  This means no more linking tricks at
all, but I'd have to check what limit this would impose on maximum guest
physical memory.

And such a significant change is not 2.6.23 material, of course.
Rusty.


  reply	other threads:[~2007-07-22 11:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-19 20:13 [PATCH] Remove -static from Documentation/lguest/Makefile S.Çağlar Onur
2007-07-20 12:02 ` Rusty Russell
2007-07-20 15:39   ` Jeremy Fitzhardinge
2007-07-22 11:09     ` Rusty Russell [this message]
2007-07-22 11:12   ` [PATCH] Make lguest example launcher non-static and simplify Rusty Russell

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=1185102573.6344.95.camel@localhost.localdomain \
    --to=rusty@rustcorp.com.au \
    --cc=caglar@pardus.org.tr \
    --cc=jeremy@goop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=virtualization@lists.linux-foundation.org \
    /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