Linux-parisc archive on lore.kernel.org
 help / color / Atom feed
From: Randolph Chung <randolph@tausq.org>
To: parisc-linux <parisc-linux@lists.parisc-linux.org>
Subject: [parisc-linux] [RFC] vdso for parisc-linux
Date: Sun, 29 Oct 2006 20:49:14 +0800
Message-ID: <4544A34A.6080700@tausq.org> (raw)

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

At kyle's urging, i've started an initial implementation of vdso support 
  for parisc-linux. I've attached what I have so far for some initial 
comments. This is primarily based on the ppc vdso infrastructure.

Some things to consider:
1) The vdso object need to be mapped to userspace apps at some "default" 
location. In fact the kernel will look for an available vma using 
get_unmapped_area(). Right now I've arbitrarily picked 0x8000'0000. This 
should be reviewed.... one idea is to just map them at at the same place 
that shared libs are mapped (near 0x4000'0000). The bigger concern is 
whether we should make the mapping with MAP_SHARED so that the shared 
area is mapped congruent in all userspace apps that use the vdso. ppc 
doesn't do this.

2) our mmu_context_t used to be a single int that stores the space id of 
the current process. This has been extended into a struct that stores 
the space id and the vdso base address

3) 64-bit vdso does not work yet. Right now I am seeing binutils errors 
if i try to build a 64-bit vdso. For now this support is disabled -- 
it's not like we have 64-bit userspace anyway.

4) I haven't hooked up all the actual vdso functions yet, but with this 
patch userspace can see the functions exposed from the kernel, we can 
use gdb to put breakpoints in the vdso, etc.

5) We need to figure out which functions we want to expose. Several 
other archs expose gettimeofday and clock_get_time via vdso. For us, 
atomic ops are also prime candidates. Several archs also use the vdso to 
provide a cleaner signal trampoline interface. The latter mostly 
requires somebody to write up all the proper cfi instructions into 
sigtramp.S

As part of testing this, I also noticed that our gas does not support 
cfi directives that were added to binutils some time ago. I've submitted 
a patch for this.

glibc will need some work to get this to work. As a first step we need a 
dl-sysdep.h that defines:
  #define NEED_DL_SYSINFO_DSO     1

If you use upstream glibc this is already enabled for all targets, but 
debian glibc will need this added if you want to test.

Anyway, please let me know if you have any comments.

randolph

[-- Attachment #2: vdso.diff --]
[-- Type: text/x-patch, Size: 43436 bytes --]

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

_______________________________________________
parisc-linux mailing list
parisc-linux@lists.parisc-linux.org
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux

             reply index

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-29 12:49 Randolph Chung [this message]
2006-10-30 16:25 ` Carlos O'Donell
2006-10-31  6:08   ` Randolph Chung
2006-11-01 15:04     ` Carlos O'Donell
2006-11-02 15:03       ` Randolph Chung
2006-11-01 15:19     ` Carlos O'Donell

Reply instructions:

You may reply publically 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=4544A34A.6080700@tausq.org \
    --to=randolph@tausq.org \
    --cc=parisc-linux@lists.parisc-linux.org \
    /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

Linux-parisc archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-parisc/0 linux-parisc/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-parisc linux-parisc/ https://lore.kernel.org/linux-parisc \
		linux-parisc@vger.kernel.org linux-parisc@archiver.kernel.org
	public-inbox-index linux-parisc


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-parisc


AGPL code for this site: git clone https://public-inbox.org/ public-inbox