All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Daney <ddaney@caviumnetworks.com>
To: Manuel Lauss <manuel.lauss@googlemail.com>
Cc: linux-mips@linux-mips.org, ralf@linux-mips.org
Subject: Re: [PATCH 2/3] MIPS: Preliminary vdso.
Date: Tue, 23 Feb 2010 13:27:46 -0800	[thread overview]
Message-ID: <4B844852.6020301@caviumnetworks.com> (raw)
In-Reply-To: <f861ec6f1002231240l40e1b07di6e751e40a2caa110@mail.gmail.com>

On 02/23/2010 12:40 PM, Manuel Lauss wrote:
> Hi David,
>
> On Fri, Feb 19, 2010 at 1:13 AM, David Daney<ddaney@caviumnetworks.com>  wrote:
>> This is a preliminary patch to add a vdso to all user processes.
>> Still missing are ELF headers and .eh_frame information.  But it is
>> enough to allow us to move signal trampolines off of the stack.  Note
>> that emulation of branch delay slots in the FPU emulator still
>> requires the stack.
>>
>> We allocate a single page (the vdso) and write all possible signal
>> trampolines into it.  The stack is moved down by one page and the vdso
>> is mapped into this space.
>
> Is there anything special required (i.e. special glibc, ..) to make use of these
> fine patches?
>

No.  Quite the opposite really, they are designed for the most part to 
be transparent to userspace.

There are a couple of changes that shouldn't break anything serious:

1) The  process' VMA will have a [vdso] region at the highest possible 
address (above the stack).  Most code will not care about this.  However 
if you mprotect(PROT_WRITE) the region and then clobber it or munmap it, 
you will likely lose the ability to return from signal handlers.  It is 
copy-on-write, so this will not affect other processes.

2) The libgcc built by some older versions of GCC will not be able throw 
exceptions across a signal frame.  This is mostly a problem if you are 
using libgcj (the GCC java runtime).  Note however that the faulty 
versions of libgcc would also fail on kernels that need 
ICACHE_REFILLS_WORKAROUND_WAR (SGI O2).  Most code doesn't try to throw 
exceptions across signal frames, so it would be unaffected.  Also note 
that really old versions of libgcc don't support this trans-signal-frame 
throwing at all.

3) GDB will not show a valid backtrace from a signal handler.  I have 
submitted a gdb patch, but it has not been accepted yet.

David Daney

  reply	other threads:[~2010-02-23 21:28 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-19  0:13 [PATCH 0/3] MIPS vdso and signal delivery optimization (v2) David Daney
2010-02-19  0:13 ` [PATCH 1/3] MIPS: Add SYSCALL to uasm David Daney
2010-03-16 19:55   ` Ralf Baechle
2010-02-19  0:13 ` [PATCH 2/3] MIPS: Preliminary vdso David Daney
2010-02-23 20:40   ` Manuel Lauss
2010-02-23 21:27     ` David Daney [this message]
2010-02-23 21:35     ` Ralf Baechle
2010-03-16 19:55   ` Ralf Baechle
2010-02-19  0:13 ` [PATCH 3/3] MIPS: Move signal trampolines off of the stack David Daney
2010-03-16 19:56   ` Ralf Baechle
2010-02-19  2:02 ` [PATCH 0/3] MIPS vdso and signal delivery optimization (v2) David Daney
2010-02-19 22:08   ` David Daney
2010-02-19 13:57 ` Ralf Baechle
2010-02-19 14:38   ` Ralf Baechle

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=4B844852.6020301@caviumnetworks.com \
    --to=ddaney@caviumnetworks.com \
    --cc=linux-mips@linux-mips.org \
    --cc=manuel.lauss@googlemail.com \
    --cc=ralf@linux-mips.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.