From: Zachary Amsden <zach@vmware.com>
To: Gerd Hoffmann <kraxel@suse.de>
Cc: Chris Wright <chrisw@sous-sol.org>,
Linus Torvalds <torvalds@osdl.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Virtualization Mailing List <virtualization@lists.osdl.org>,
Xen-devel <xen-devel@lists.xensource.com>,
Andrew Morton <akpm@osdl.org>, Dan Hecht <dhecht@vmware.com>,
Dan Arai <arai@vmware.com>, Anne Holler <anne@vmware.com>,
Pratap Subrahmanyam <pratap@vmware.com>,
Christopher Li <chrisl@vmware.com>,
Joshua LeVasseur <jtl@ira.uka.de>, Rik Van Riel <riel@redhat.com>,
Jyothy Reddy <jreddy@vmware.com>, Jack Lo <jlo@vmware.com>,
Kip Macy <kmacy@fsmware.com>, Jan Beulich <jbeulich@novell.com>,
Ky Srinivasan <ksrinivasan@novell.com>,
Wim Coekaerts <wim.coekaerts@oracle.com>,
Leendert van Doorn <leendert@watson.ibm.com>
Subject: Re: [RFC, PATCH 7/24] i386 Vmi memory hole
Date: Wed, 15 Mar 2006 00:36:34 -0800 [thread overview]
Message-ID: <4417D212.20401@vmware.com> (raw)
In-Reply-To: <4417CFDA.1060806@suse.de>
Gerd Hoffmann wrote:
>>> The complications in my patch come
>>> from the fact that the vsyscall page has to be relocated dynamically,
>>> requiring, basically run time linking on the page and some tweaks to get
>>> sysenter to work. If you don't use vsyscall (say, non-TLS glibc), then
>>> you don't need that complexity. But I think it might be needed now,
>>> even for Xen.
>>>
>> I believe both Xen and execshield move vsyscall out of fixmap, and then
>> map into userspace as normal vma.
>>
>
> Yep, my patch (attached below for reference) moves the vsyscall page
> into user address space, just below PAGE_OFFSET. Works basically the
> same way the vsyscall page is mapped in the ia32 emulation of the x86_64
> architecture. Address stays fixed, thus the relocation magic isn't needed.
>
> Once the vsyscall page is moved out of fixmap it's easy to make fixmap
> movable and thus have a runtime-resizable address space hole at the top
> of address space. Patch is attached too, although that one is more
> proof-of-concept, it doesn't make much sense as-is. It has a kernel
> command line option to specify the top of address space so you can play
> around with it ...
>
> Both patches are against -rc3 and most likely still apply just fine,
> havn't tested that though.
>
Your patch looks a lot cleaner and less hackish than mine. But I wonder
if it still works with kernels that support the sysenter method of
calling into the kernel. Look at the following code:
ENTRY(sysenter_entry)
movl TSS_sysenter_esp0(%esp),%esp
sysenter_past_esp:
STI
pushl $(__USER_DS)
pushl %ebp
pushfl
pushl $(__USER_CS)
pushl $SYSENTER_RETURN
SYSENTER_RETURN is a link time constant that is defined based on the
location of the vsyscall page. If the vsyscall page can move, this can
not be a constant. The reason is, this "fake" exception frame is used
to return back to the EIP of the call site, and sysenter does not record
the EIP of the call site.
Zach
next prev parent reply other threads:[~2006-03-15 8:37 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-13 18:04 [RFC, PATCH 7/24] i386 Vmi memory hole Zachary Amsden
2006-03-14 6:41 ` Chris Wright
2006-03-14 7:14 ` Zachary Amsden
2006-03-14 21:56 ` Chris Wright
2006-03-14 22:35 ` Zachary Amsden
2006-03-15 4:31 ` Chris Wright
2006-03-15 8:27 ` Gerd Hoffmann
2006-03-15 8:36 ` Zachary Amsden [this message]
2006-03-15 9:09 ` Chris Wright
2006-03-15 9:18 ` Zachary Amsden
2006-03-15 9:41 ` Chris Wright
2006-03-15 9:27 ` Gerd Hoffmann
2006-03-15 9:37 ` Zachary Amsden
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=4417D212.20401@vmware.com \
--to=zach@vmware.com \
--cc=akpm@osdl.org \
--cc=anne@vmware.com \
--cc=arai@vmware.com \
--cc=chrisl@vmware.com \
--cc=chrisw@sous-sol.org \
--cc=dhecht@vmware.com \
--cc=jbeulich@novell.com \
--cc=jlo@vmware.com \
--cc=jreddy@vmware.com \
--cc=jtl@ira.uka.de \
--cc=kmacy@fsmware.com \
--cc=kraxel@suse.de \
--cc=ksrinivasan@novell.com \
--cc=leendert@watson.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pratap@vmware.com \
--cc=riel@redhat.com \
--cc=torvalds@osdl.org \
--cc=virtualization@lists.osdl.org \
--cc=wim.coekaerts@oracle.com \
--cc=xen-devel@lists.xensource.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