WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] NPTL/TLS "emulation" idea

To: Rik van Riel <riel@xxxxxxxxxx>
Subject: Re: [Xen-devel] NPTL/TLS "emulation" idea
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Wed, 20 Oct 2004 08:46:40 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxxxx, Jakub Jelinek <jakub@xxxxxxxxxx>, Roland McGrath <roland@xxxxxxxxxx>
Delivery-date: Wed, 20 Oct 2004 08:56:21 +0100
Envelope-to: steven.hand@xxxxxxxxxxxx
In-reply-to: Your message of "Tue, 19 Oct 2004 14:28:34 EDT." <Pine.LNX.4.44.0410191416510.18723-100000@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
List-archive: <http://sourceforge.net/mailarchive/forum.php?forum=xen-devel>
List-help: <mailto:xen-devel-request@lists.sourceforge.net?subject=help>
List-id: List for Xen developers <xen-devel.lists.sourceforge.net>
List-post: <mailto:xen-devel@lists.sourceforge.net>
List-subscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=subscribe>
List-unsubscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=unsubscribe>
Sender: xen-devel-admin@xxxxxxxxxxxxxxxxxxxxx
Yes, I think this would work! :-)

I'll play around with expands-down segments a bit and, if they work as
desribed, I'll add the flipping idea to Xen. I'm pretty sure it'll
save us quite a few emulations, particularly if the +ve offsets are
accessed only infrequently.

It'll be interesting to see if it's good enough to be able to remove
the warning about /lib/tls.

 Thanks,
 Keir


> Hi,
> 
> Currently TLS wraparound segments are a problem in Xen,
> since the kernel needs to be protected by keeping the
> user space segments out of kernel space.
> 
> A few weeks ago Roland, Jakub and myself brainstormed
> about this problem.  One of the things that came up is
> that the positive (glibc private data) and -ve (TLS)
> data are not generally used at the same time.
> 
> This lead to one of us (I don't remember whom, sorry)
> came up with the idea of "flipping the segment around"
> whenever a segment violation happens on a segment that
> should have been 4GB in size, and the fault happens on
> an address between 0 and TASK_SIZE.
> 
> Having glanced briefly at some documentation on how
> the segments works, it looks like it should be possible
> to convert the positive (clipped) segment into an
> Expands-down segment, allowing TLS to work transparently
> without needing to emulate any instructions.
> 
> Provided the segment doesn't need to be "flipped" too
> often, this could provide for reasonably high performance
> TLS functionality, without the potential problems that
> instruction rewriting brings with it.
> 
> What do you think ?


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel

<Prev in Thread] Current Thread [Next in Thread>