public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* new syscall-stub support now in CVS glibc
@ 2003-12-11  2:00 David Mosberger
  2003-12-12  3:17 ` Ian Wienand
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: David Mosberger @ 2003-12-11  2:00 UTC (permalink / raw)
  To: linux-ia64

The latest CVS tree of glibc now sports official support for the new
syscall-stubs (which enable EPC-based kernel entry and light-weight
system call handlers).  For backwards-compatibility reasons, the new
stubs will only be used for NPTL/TLS-enabled versions of libc, but
that should be the normal case for most distros already (or it will be
the normal case soon).

Compared to the stubs which we discussed earlier on this list, there
was one small change: the kernel entry point is now being stored at
offset 8 instead of -8 of the thread-pointer (register r13).  It turns
out that was easier to support in NPTL and since that word is
thread-library-specific anyhow, there was no reason not to use it.  In
other words, the latest new syscall-stubs look like this:

	adds r2 = 8, r13;;
	ld8 r2 = [r2]
	.save ar.pfs, r11
	mov r11 = ar.pfs;;
	.body
	mov r15 = SYSCALLNUMBER
	mov b7 = r2
	br.call.sptk.many b6 = b7
	.restore sp
	mov ar.pfs = r11

Of course, no application should rely on this (they should use
syscall() instead, if necessary), but I just mention it for
completeness.

If you want to play with the new syscall-stubs, you'll need to update
GCC first because the existing GCCs have unwinders that aren't
sufficiently capable of supporting the new syscall-stubs.  Jakub
Jelinek submitted a patch [1] for this already.  The alternative (and
recommended) way to get GCC updated is to install libunwind v0.96 [2]
first and then to build GCC v3.3.x or newer.  GCC will automatically
detect the presence of libunwind and use it as the unwinder in that
case.

Enjoy,

	--david

[1] http://gcc.gnu.org/ml/gcc-patches/2003-12/msg00940.html
[2] http://www.hpl.hp.com/research/linux/libunwind/

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

* Re: new syscall-stub support now in CVS glibc
  2003-12-11  2:00 new syscall-stub support now in CVS glibc David Mosberger
@ 2003-12-12  3:17 ` Ian Wienand
  2003-12-12  4:09 ` David Mosberger
  2003-12-12  4:48 ` Ian Wienand
  2 siblings, 0 replies; 4+ messages in thread
From: Ian Wienand @ 2003-12-12  3:17 UTC (permalink / raw)
  To: linux-ia64

On Wed, Dec 10, 2003 at 06:00:27PM -0800, David Mosberger wrote:
> The latest CVS tree of glibc now sports official support for the new
> syscall-stubs (which enable EPC-based kernel entry and light-weight
> system call handlers).

If you would rather not build this yourself, I have built a version
with a libunwind enabled gcc Debian users should be able to grab by
putting

deb http://www.gelato.unsw.edu.au/~ianw/libc-nptl ./

in /etc/apt/sources.list

and then type

apt-get update
apt-get upgrade

** Note: you want to do this in a chroot environment ** 

This is just an unoffical packaged version of glibc cvs with these
changes for people who want to try it, I'm sure Debian propper will
update soon.

-i

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

* Re: new syscall-stub support now in CVS glibc
  2003-12-11  2:00 new syscall-stub support now in CVS glibc David Mosberger
  2003-12-12  3:17 ` Ian Wienand
@ 2003-12-12  4:09 ` David Mosberger
  2003-12-12  4:48 ` Ian Wienand
  2 siblings, 0 replies; 4+ messages in thread
From: David Mosberger @ 2003-12-12  4:09 UTC (permalink / raw)
  To: linux-ia64

>>>>> On Fri, 12 Dec 2003 14:17:51 +1100, Ian Wienand <ianw@gelato.unsw.edu.au> said:

  Ian> If you would rather not build this yourself, I have built a
  Ian> version with a libunwind enabled gcc Debian users should be
  Ian> able to grab by putting

  Ian> deb http://www.gelato.unsw.edu.au/~ianw/libc-nptl ./

  Ian> in /etc/apt/sources.list

  Ian> and then type

  Ian> apt-get update apt-get upgrade

Very cool!

  Ian> ** Note: you want to do this in a chroot environment **

Is this a general caution (which I'm sure is in place) or do you know
of something that breaks?  In theory, this libc should even let you
boot with non-TLS kernels, but I certainly haven't tried that.

	--david

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

* Re: new syscall-stub support now in CVS glibc
  2003-12-11  2:00 new syscall-stub support now in CVS glibc David Mosberger
  2003-12-12  3:17 ` Ian Wienand
  2003-12-12  4:09 ` David Mosberger
@ 2003-12-12  4:48 ` Ian Wienand
  2 siblings, 0 replies; 4+ messages in thread
From: Ian Wienand @ 2003-12-12  4:48 UTC (permalink / raw)
  To: linux-ia64

On Thu, Dec 11, 2003 at 08:09:10PM -0800, David Mosberger wrote:
>   Ian> ** Note: you want to do this in a chroot environment **
> Is this a general caution (which I'm sure is in place) or do you know
> of something that breaks?  In theory, this libc should even let you
> boot with non-TLS kernels, but I certainly haven't tried that.

A general caution just in case I did something wrong with the package
... I'd only trust it when the Debian guys have done it :)

-i

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

end of thread, other threads:[~2003-12-12  4:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-12-11  2:00 new syscall-stub support now in CVS glibc David Mosberger
2003-12-12  3:17 ` Ian Wienand
2003-12-12  4:09 ` David Mosberger
2003-12-12  4:48 ` Ian Wienand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox