[parisc-linux] [RFC] vdso for parisc-linux
Randolph Chung
randolph at tausq.org
Sun Oct 29 05:49:14 MST 2006
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vdso.diff
Type: text/x-patch
Size: 43436 bytes
Desc: not available
Url : http://lists.parisc-linux.org/pipermail/parisc-linux/attachments/20061029/468f9989/attachment.bin
More information about the parisc-linux
mailing list