All of lore.kernel.org
 help / color / mirror / Atom feed
From: Randolph Chung <randolph@tausq.org>
To: Carlos O'Donell <carlos@systemhalted.org>
Cc: parisc-linux <parisc-linux@lists.parisc-linux.org>
Subject: Re: [parisc-linux] [RFC] vdso for parisc-linux
Date: Tue, 31 Oct 2006 14:08:33 +0800	[thread overview]
Message-ID: <4546E861.9050909@tausq.org> (raw)
In-Reply-To: <119aab440610300825l4cfd056fi21738f63f3d99d72@mail.gmail.com>

>> 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.
> 
> Users may enable or disable the vDSO on their system as a
> configuration option. Therefore glibc can't rely on the vDSO being
> present. How would this effect a prelinking implementation for hppa? I

glibc looks for a special ELF AUX header to find out about the address
of the vdso. If it's not present, then it won't call the vdso....

The implementation for this is cleaner in cvs glibc than in debian glibc.

I'm not quite sure how this interacts with prelink.

> think I would rather see the vDSO at a high address, and enable
> MAP_SHARED. What is wrong with enabling MAP_SHARED?

I can't think of one, although it needs to be marked MAY_WRITE so that
if we put a breakpoint the page will get COW'ed. Need to look at this
some more.

>> 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.
> 
> You use the word "can", but have you tried to put breakpoints in the
> vDSO code pages?

yes, it works.

> atomic ops are *not* prime candidates for vDSO's, I was wrong about
> this. There are special requirements for the atomic operations which
> require access to kernel locks, no scheduling, and no signals.  All of
> these are impossible to do if gdb can write to code, thus we put the
> atomic ops on the gateway page (which has the aforementioned special
> properties).

i can't quite see how lws disables scheduling... maybe you can enlighten
me :)

> The rest of your suggestions are great. Signal trampoline handlers are
> #1 on the list of cleanups. We already know HPUX does something
> similar.

Well, there are two parts:
1) Finding "sigreturn"
2) Finding the system state on the stack

Right now this is all done on parisc-linux by poking in memory using
magic constants.

On HPUX, #1 is available symbolically, but #2 still requires poking in
memory using magic constants. It is particularly nasty on HPUX because
the kernel can store state in either narrow or wide mode and the offsets
are not fixed.

>> 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.
> 
> What testing do we need to do before you check this into git?

What I have is just infrastructure, we need to add some functionality
into it :)

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

  reply	other threads:[~2006-10-31  6:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-29 12:49 [parisc-linux] [RFC] vdso for parisc-linux Randolph Chung
2006-10-30 16:25 ` Carlos O'Donell
2006-10-31  6:08   ` Randolph Chung [this message]
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 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=4546E861.9050909@tausq.org \
    --to=randolph@tausq.org \
    --cc=carlos@systemhalted.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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.