From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Mikael Pettersson <mikpe@it.uu.se>
Cc: acahalan@gmail.com, ak@suse.de, arjan@infradead.org,
ebiederm@xmission.com, linux-kernel@vger.kernel.org,
mingo@elte.hu, torvalds@osdl.org, zach@vmware.com
Subject: Re: Assignment of GDT entries
Date: Fri, 15 Sep 2006 11:27:45 -0700 [thread overview]
Message-ID: <450AF0A1.60803@goop.org> (raw)
In-Reply-To: <17674.27416.420259.744117@alkaid.it.uu.se>
Mikael Pettersson wrote:
> > Changing the API
> > to use abstract "TLS indicies" would also require a call to return the
> > "TLS base", which hardly seems like an improvement.
>
> The TLS base can obviously be zero.
>
> User-space asks to access TLS #n (for allocs #n can be -1).
> The kernel maps that to GDT index #m.
> The kernel stores #m in the user-space buffer.
> User-space maps #m to a selector.
>
I'm missing why this is a substantial improvement over the current
interface (or functionally different at all). What does this proposal
let you do that the current one doesn't?
> Look, I'm not saying the current API is perfect, far from it. But it does
> have valid usage modes which are broken in x86-64's ia32 emulation, and
> will break on i386 of you reallocate the TLS GDT indices. This is a fact.
>
Hm, well its a "fact" in that they use different segment descriptors,
but you'd be hard pressed to say that was a breakage. set_thread_area
was added in 2.5.29 (Jul 2002), and x86-64 added support in 2.5.43 (Oct
2002), so the current behaviour is pretty much as it has always been.
If you have a program that expects something different, you either wrote
it in Jul-Oct 2002, or you made an unsustainable assumption about how
set_thread_area() works.
> Look, I'm not saying the current API is perfect, far from it. But it does
> have valid usage modes which are broken in x86-64's ia32 emulation, and
> will break on i386 of you reallocate the TLS GDT indices. This is a fact.
>
You seem to have a specific use-case in mind; do you have a program
which would like to use a new interface? Would you mind spelling it
out, and describe why the current interface doesn't work for you?
J
next prev parent reply other threads:[~2006-09-15 18:27 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-15 7:55 Assignment of GDT entries Mikael Pettersson
2006-09-15 8:20 ` Jeremy Fitzhardinge
2006-09-15 8:58 ` Mikael Pettersson
2006-09-15 18:27 ` Jeremy Fitzhardinge [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-09-14 4:06 Albert Cahalan
2006-09-14 4:44 ` Eric W. Biederman
2006-09-14 6:19 ` Albert Cahalan
2006-09-14 6:28 ` Zachary Amsden
2006-09-14 7:12 ` Albert Cahalan
2006-09-14 7:24 ` Zachary Amsden
2006-09-14 6:29 ` Jeremy Fitzhardinge
2006-09-14 3:23 Albert Cahalan
2006-09-14 6:11 ` Jeremy Fitzhardinge
2006-09-13 18:58 Jeremy Fitzhardinge
2006-09-13 19:16 ` Arjan van de Ven
2006-09-13 20:00 ` Alan Cox
2006-09-13 20:02 ` Jeremy Fitzhardinge
2006-09-13 20:20 ` Jeremy Fitzhardinge
2006-09-13 20:59 ` Zachary Amsden
2006-09-13 21:15 ` Jeremy Fitzhardinge
2006-09-13 21:35 ` Alan Cox
2006-09-14 0:25 ` Zachary Amsden
2006-09-14 1:40 ` Stephen Rothwell
2006-09-14 13:03 ` Alan Cox
2006-09-13 19:55 ` linux-os (Dick Johnson)
2006-09-13 20:08 ` Jeremy Fitzhardinge
2006-09-13 20:32 ` linux-os (Dick Johnson)
2006-09-13 21:21 ` Linus Torvalds
2006-09-13 21:47 ` Jeremy Fitzhardinge
2006-09-13 22:05 ` Linus Torvalds
2006-09-13 22:22 ` Jeremy Fitzhardinge
2006-09-14 6:00 ` Andi Kleen
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=450AF0A1.60803@goop.org \
--to=jeremy@goop.org \
--cc=acahalan@gmail.com \
--cc=ak@suse.de \
--cc=arjan@infradead.org \
--cc=ebiederm@xmission.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mikpe@it.uu.se \
--cc=mingo@elte.hu \
--cc=torvalds@osdl.org \
--cc=zach@vmware.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;
as well as URLs for NNTP newsgroup(s).