All of lore.kernel.org
 help / color / mirror / Atom feed
* RE: glibc patch for TLS?
@ 2005-04-24  9:07 Ian Pratt
  2005-04-25 16:47 ` Michael Long
  0 siblings, 1 reply; 11+ messages in thread
From: Ian Pratt @ 2005-04-24  9:07 UTC (permalink / raw)
  To: Michael Long, Nils Toedtmann; +Cc: xen-devel

 

> I pulled out the glibc-xen-tls.patch file and applied it to 
> Gentoo's glibc-2.3.5.  It compiled and installed, but when I 
> reboot into Xen, I still get the emulation warning.  Should 
> it autodetect that the patch is there, or is there something 
> I need to do to disable the check in Xen in order to test the patch?

Did you remember to build glibc with "-mno-tls-direct-seg-refs" ?

Ian

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: glibc patch for TLS?
  2005-04-24  9:07 glibc patch for TLS? Ian Pratt
@ 2005-04-25 16:47 ` Michael Long
  2005-04-26  2:01   ` Edward Middleton
  0 siblings, 1 reply; 11+ messages in thread
From: Michael Long @ 2005-04-25 16:47 UTC (permalink / raw)
  Cc: Nils Toedtmann, xen-devel

Nope, that's what I forgot.  I recompiled the patched glibc with that
flag and everything seems to be working fine.  I can post the ebuild
if people are interested.  It's pretty straightforward, just adding
the patch and making for the CFLAGS get set properly.

I'm now compiling all my packages with -mno-tls-direct-seg-refs.  Is
this necessary/recommended?  I know some ebuild strip out CFLAGS it's
unsure of, so if it's necessary other packages may need to be
modified.

On 4/24/05, Ian Pratt <m+Ian.Pratt@cl.cam.ac.uk> wrote:
> 
> 
> > I pulled out the glibc-xen-tls.patch file and applied it to
> > Gentoo's glibc-2.3.5.  It compiled and installed, but when I
> > reboot into Xen, I still get the emulation warning.  Should
> > it autodetect that the patch is there, or is there something
> > I need to do to disable the check in Xen in order to test the patch?
> 
> Did you remember to build glibc with "-mno-tls-direct-seg-refs" ?
> 
> Ian
>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: glibc patch for TLS?
  2005-04-25 16:47 ` Michael Long
@ 2005-04-26  2:01   ` Edward Middleton
  0 siblings, 0 replies; 11+ messages in thread
From: Edward Middleton @ 2005-04-26  2:01 UTC (permalink / raw)
  To: xen-devel

[-- Attachment #1: Type: text/plain, Size: 217 bytes --]

Michael Long wrote:

>I recompiled the patched glibc with that flag and everything seems to be working fine.  I can post the ebuild if people are interested.
>
Could you also put it in http://bugs.gentoo.org/

Edward

[-- Attachment #2: edward.vcf --]
[-- Type: text/x-vcard, Size: 588 bytes --]

begin:vcard
fn:Edward Middleton
n:Middleton;Edward
org:Nikon Systems;2 Systems Department 1 Development Section
adr;quoted-printable;quoted-printable;quoted-printable;quoted-printable;quoted-printable:=E5=93=81=E5=B7=9D=E5=8C=BA;;=E3=83=8B=E3=82=B3=E3=83=B3=E5=A4=A7=E4=BA=95=E8=A3=BD=E4=BD=9C=E6=89=80=E5=
	=86=85 101=E5=8F=B7=E9=A4=A81F;=E8=A5=BF=E5=A4=A7=E4=BA=951-6-3;=E6=9D=B1=E4=BA=AC=E9=83=BD;140-0015;=E6=97=A5=E6=9C=AC
email;internet:edward@nikon-sys.co.jp
tel;work:(03) 3773 7580 Toll 7312-6759
tel;fax:(03) 3773-7574 Toll 7312-6799 
x-mozilla-html:FALSE
version:2.1
end:vcard


[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: glibc patch for TLS?
  2005-04-26  7:28 ` Nils Toedtmann
@ 2005-04-26 14:53   ` Michael Long
  0 siblings, 0 replies; 11+ messages in thread
From: Michael Long @ 2005-04-26 14:53 UTC (permalink / raw)
  To: Nils Toedtmann; +Cc: Ian Pratt, xen-devel

On 4/26/05, Nils Toedtmann <xen-devel@nils.toedtmann.net> wrote:
> Am Montag, den 25.04.2005, 21:57 +0100 schrieb Ian Pratt:
> >
> > > Nope, that's what I forgot.  I recompiled the patched glibc
> > > with that flag and everything seems to be working fine.  I
> > > can post the ebuild if people are interested.  It's pretty
> > > straightforward, just adding the patch and making for the
> > > CFLAGS get set properly.
> > >
> > > I'm now compiling all my packages with
> > > -mno-tls-direct-seg-refs.  Is this necessary/recommended?  I
> > > know some ebuild strip out CFLAGS it's unsure of, so if it's
> > > necessary other packages may need to be modified.
> 
> Now it's really cool to run a source distro like gentoo. I wonder if you
> can bootstrap it with that CFLAGS?

I don't see why not.  I was able to build the base system packages
(using 'emerge system') on my build system without any apparent
problems.  Glibc strips out unknown CFLAGS though, so you have to have
a modified ebuild that makes sure it uses it (bootstrapping or not).

  -Michael

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: glibc patch for TLS?
  2005-04-25 23:51 ` Michael Long
@ 2005-04-26 11:32   ` Måns Rullgård
  0 siblings, 0 replies; 11+ messages in thread
From: Måns Rullgård @ 2005-04-26 11:32 UTC (permalink / raw)
  To: xen-devel

Michael Long <nikarul@gmail.com> writes:

> That would be helpful, though the access still could be inside a
> library, which would be a be pain to track down in say, Mozilla or
> KDE.  Still, it's better than nothing.

If it printed the pid, name, and address of the offending instruction,
it should be easy to track down.

-- 
Måns Rullgård
mru@inprovide.com

^ permalink raw reply	[flat|nested] 11+ messages in thread

* RE: glibc patch for TLS?
  2005-04-25 20:57 Ian Pratt
  2005-04-25 23:51 ` Michael Long
@ 2005-04-26  7:28 ` Nils Toedtmann
  2005-04-26 14:53   ` Michael Long
  1 sibling, 1 reply; 11+ messages in thread
From: Nils Toedtmann @ 2005-04-26  7:28 UTC (permalink / raw)
  To: Ian Pratt; +Cc: Michael Long, xen-devel

Am Montag, den 25.04.2005, 21:57 +0100 schrieb Ian Pratt: 
>  
> > Nope, that's what I forgot.  I recompiled the patched glibc 
> > with that flag and everything seems to be working fine.  I 
> > can post the ebuild if people are interested.  It's pretty 
> > straightforward, just adding the patch and making for the 
> > CFLAGS get set properly.
> > 
> > I'm now compiling all my packages with 
> > -mno-tls-direct-seg-refs.  Is this necessary/recommended?  I 
> > know some ebuild strip out CFLAGS it's unsure of, so if it's 
> > necessary other packages may need to be modified.

Now it's really cool to run a source distro like gentoo. I wonder if you
can bootstrap it with that CFLAGS?


> Glibc really hammers the thread local storage stuff and hence
> experiences rather more of a slow down rather than any applications
> we've come across, but it would obviously be preferable to recompile
> anything that uses tls.
> 
> One of the hard things is figuring out which applications actually make
> use of the thread local attribute, and hence would actually benefit from
> recompiling.
> 
> I guess we could modify the warning message to print out the name of the
> process that did the -ve segment access...

Would be really helpful for all others running binary distros (like me).
I have to identify the individual FC-rpms to rebuild them. So i vote for
it.

As FC4test shippes with Xen: how did they solve the probem (did they)?

/nils.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: glibc patch for TLS?
  2005-04-25 20:57 Ian Pratt
@ 2005-04-25 23:51 ` Michael Long
  2005-04-26 11:32   ` Måns Rullgård
  2005-04-26  7:28 ` Nils Toedtmann
  1 sibling, 1 reply; 11+ messages in thread
From: Michael Long @ 2005-04-25 23:51 UTC (permalink / raw)
  To: Ian Pratt; +Cc: Nils Toedtmann, xen-devel

That would be helpful, though the access still could be inside a
library, which would be a be pain to track down in say, Mozilla or
KDE.  Still, it's better than nothing.

  -Michael

On 4/25/05, Ian Pratt <m+Ian.Pratt@cl.cam.ac.uk> wrote:
> 
> 
> > Nope, that's what I forgot.  I recompiled the patched glibc
> > with that flag and everything seems to be working fine.  I
> > can post the ebuild if people are interested.  It's pretty
> > straightforward, just adding the patch and making for the
> > CFLAGS get set properly.
> >
> > I'm now compiling all my packages with
> > -mno-tls-direct-seg-refs.  Is this necessary/recommended?  I
> > know some ebuild strip out CFLAGS it's unsure of, so if it's
> > necessary other packages may need to be modified.
> 
> Glibc really hammers the thread local storage stuff and hence
> experiences rather more of a slow down rather than any applications
> we've come across, but it would obviously be preferable to recompile
> anything that uses tls.
> 
> One of the hard things is figuring out which applications actually make
> use of the thread local attribute, and hence would actually benefit from
> recompiling.
> 
> I guess we could modify the warning message to print out the name of the
> process that did the -ve segment access...
> 
> Ian
>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* RE: glibc patch for TLS?
@ 2005-04-25 20:57 Ian Pratt
  2005-04-25 23:51 ` Michael Long
  2005-04-26  7:28 ` Nils Toedtmann
  0 siblings, 2 replies; 11+ messages in thread
From: Ian Pratt @ 2005-04-25 20:57 UTC (permalink / raw)
  To: Michael Long; +Cc: Nils Toedtmann, xen-devel

 

> Nope, that's what I forgot.  I recompiled the patched glibc 
> with that flag and everything seems to be working fine.  I 
> can post the ebuild if people are interested.  It's pretty 
> straightforward, just adding the patch and making for the 
> CFLAGS get set properly.
> 
> I'm now compiling all my packages with 
> -mno-tls-direct-seg-refs.  Is this necessary/recommended?  I 
> know some ebuild strip out CFLAGS it's unsure of, so if it's 
> necessary other packages may need to be modified.

Glibc really hammers the thread local storage stuff and hence
experiences rather more of a slow down rather than any applications
we've come across, but it would obviously be preferable to recompile
anything that uses tls.

One of the hard things is figuring out which applications actually make
use of the thread local attribute, and hence would actually benefit from
recompiling.

I guess we could modify the warning message to print out the name of the
process that did the -ve segment access...

Ian

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: glibc patch for TLS?
  2005-04-21 11:31 ` Nils Toedtmann
@ 2005-04-24  3:33   ` Michael Long
  0 siblings, 0 replies; 11+ messages in thread
From: Michael Long @ 2005-04-24  3:33 UTC (permalink / raw)
  To: Nils Toedtmann; +Cc: xen-devel

I pulled out the glibc-xen-tls.patch file and applied it to Gentoo's
glibc-2.3.5.  It compiled and installed, but when I reboot into Xen, I
still get the emulation warning.  Should it autodetect that the patch
is there, or is there something I need to do to disable the check in
Xen in order to test the patch?

  -Michael

On 4/21/05, Nils Toedtmann <xen-devel@nils.toedtmann.net> wrote:
> Am Donnerstag, den 21.04.2005, 00:28 -0500 schrieb Michael Long:
> > I've been experimenting with Xen on a Gentoo Linux box, and I've run
> > into the problem that some binaries cause the Xen to generate a TLS
> > warning and go into compatibility mode, even though I've moved
> > /lib/tls to /lib/tls.disabled.  I figure I have some static binary
> > causing it, though I am not sure what.  I saw someone mention that
> > there was a patch for glibc to allow Xen to run with TLS libraries,
> > and I'd like to try it out, but I can't seem to find it anywhere.  Is
> > it available for public testing?  Thanks.
> 
> Just discovered a glibc for fc3 built on tuesday:
> 
>   <http://www.cl.cam.ac.uk/Research/SRG/netos/xen/downloads/RPMS/fc3/>
> 
> It's an older fc3-glibc (2.3.4 from 2004/12/19), but it contains a
> "glibc-xen-tls.patch"! Did not try it (yet), but maybe that's it. The
> packager did not maintain the changelog of the specfile, so i cannot see
> the actual differences to the original fc3-glibc.
> 
> /nils.
> 
>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: glibc patch for TLS?
  2005-04-21  5:28 Michael Long
@ 2005-04-21 11:31 ` Nils Toedtmann
  2005-04-24  3:33   ` Michael Long
  0 siblings, 1 reply; 11+ messages in thread
From: Nils Toedtmann @ 2005-04-21 11:31 UTC (permalink / raw)
  To: Michael Long; +Cc: xen-devel

Am Donnerstag, den 21.04.2005, 00:28 -0500 schrieb Michael Long:
> I've been experimenting with Xen on a Gentoo Linux box, and I've run
> into the problem that some binaries cause the Xen to generate a TLS
> warning and go into compatibility mode, even though I've moved
> /lib/tls to /lib/tls.disabled.  I figure I have some static binary
> causing it, though I am not sure what.  I saw someone mention that
> there was a patch for glibc to allow Xen to run with TLS libraries,
> and I'd like to try it out, but I can't seem to find it anywhere.  Is
> it available for public testing?  Thanks.

Just discovered a glibc for fc3 built on tuesday:

  <http://www.cl.cam.ac.uk/Research/SRG/netos/xen/downloads/RPMS/fc3/>

It's an older fc3-glibc (2.3.4 from 2004/12/19), but it contains a
"glibc-xen-tls.patch"! Did not try it (yet), but maybe that's it. The
packager did not maintain the changelog of the specfile, so i cannot see
the actual differences to the original fc3-glibc.

/nils.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* glibc patch for TLS?
@ 2005-04-21  5:28 Michael Long
  2005-04-21 11:31 ` Nils Toedtmann
  0 siblings, 1 reply; 11+ messages in thread
From: Michael Long @ 2005-04-21  5:28 UTC (permalink / raw)
  To: xen-devel

Hi,

I've been experimenting with Xen on a Gentoo Linux box, and I've run
into the problem that some binaries cause the Xen to generate a TLS
warning and go into compatibility mode, even though I've moved
/lib/tls to /lib/tls.disabled.  I figure I have some static binary
causing it, though I am not sure what.  I saw someone mention that
there was a patch for glibc to allow Xen to run with TLS libraries,
and I'd like to try it out, but I can't seem to find it anywhere.  Is
it available for public testing?  Thanks.

  -Michael

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2005-04-26 14:53 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-24  9:07 glibc patch for TLS? Ian Pratt
2005-04-25 16:47 ` Michael Long
2005-04-26  2:01   ` Edward Middleton
  -- strict thread matches above, loose matches on Subject: below --
2005-04-25 20:57 Ian Pratt
2005-04-25 23:51 ` Michael Long
2005-04-26 11:32   ` Måns Rullgård
2005-04-26  7:28 ` Nils Toedtmann
2005-04-26 14:53   ` Michael Long
2005-04-21  5:28 Michael Long
2005-04-21 11:31 ` Nils Toedtmann
2005-04-24  3:33   ` Michael Long

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.