linux-mips
[Top] [All Lists]

MIPS RI/XI & trampolines [was:- [PATCH, RFC] MIPS: Implement the getcont

To: David Daney <ddaney@caviumnetworks.com>
Subject: MIPS RI/XI & trampolines [was:- [PATCH, RFC] MIPS: Implement the getcontext API ]
From: Brian Foster <brian.foster@innova-card.com>
Date: Thu, 5 Mar 2009 08:58:31 +0100
Cc: "David VomLehn (dvomlehn)" <dvomlehn@cisco.com>, Ralf Baechle <ralf@linux-mips.org>, "Maciej W. Rozycki" <macro@codesourcery.com>, linux-mips@linux-mips.org, libc-ports@sourceware.org, "Maciej W. Rozycki" <macro@linux-mips.org>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:from:reply-to:to :subject:date:user-agent:cc:references:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :message-id; bh=VQAygljJbtVx3hMfoU/6vYDpSB57WJsQ+3kO+QPHR54=; b=ZL/u/fwcdTcyuaHxh8S5cNB9VmW+PyglOw1w+OaKiTZbqvJL3Q6+esgNhIY28ZCizS AkWmuC7M6Ov0aZXXlOugYs5+ftaMTiQigc5rv6emVg3rKbirERkPh/XFKmBANw4+iyG6 k34k9wfmJU+AiK2f+3oEqdc6B78RmkPRinnKI=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:reply-to:to:subject:date:user-agent:cc:references :in-reply-to:mime-version:content-type:content-transfer-encoding :content-disposition:message-id; b=e9yMpXTX1ncDllyfVCbJsHx1Kb1vThDt/LLbuJhbswWWLWrZH+1sbFau3toem+u+zd fqrLvANRQcogpnD2InJ9aC2sk9kBcP2sdKneRTjNjmneL2X3zi5bzWsUDLUm90VkfJM3 F9mWIJKfBri+44U9IVQEZT1QQQHvWwpCDNeCM=
In-reply-to: <49AF01E8.80705@caviumnetworks.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <alpine.DEB.1.10.0902282326580.4064@tp.orcam.me.uk> <FF038EB85946AA46B18DFEE6E6F8A289BE0B68@xmb-rtp-218.amer.cisco.com> <49AF01E8.80705@caviumnetworks.com>
Reply-to: Brian Foster <brian.foster@innova-card.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: KMail/1.10.4 (Linux/2.6.27-11-generic; KDE/4.1.4; x86_64; ; )
On Wednesday 04 March 2009 23:34:16 David Daney wrote:
> David VomLehn (dvomlehn) wrote:
> >> -----Original Message-----
> >> Sent: Wednesday, March 04, 2009 7:44 AM
> >> From: [...] On Behalf Of Ralf Baechle
> >>
> >> On Wed, Mar 04, 2009 at 09:19:28AM +0100, Brian Foster wrote:
> >>> On Tuesday 03 March 2009 17:56:25 David Daney wrote:
> >>>>[ ... ]
> >>>> When (and if) we move the sigreturn trampoline to a vdso we should be
> >>>> able to maintain the ABI.
> >>> it's more a matter of "when" rather than "if".
> >>> there is still an intention here to use XI (we
> >>> have SmartMIPS), which requires not using the
> >>> signal (or FP) trampoline on the stack.
> >>>[ ... ]
> >> We generally want to get rid of stack trampolines.
> >> Trampolines require cacheflushing which especially
> >> on SMP systems can be a rather expensive operation.
> > 
> > If I understand this correctly, using a vdso would allow a stack without
> > execute permission on those processors that differentiate between read
> > and execute permission. This defeats attaches that use buffer overrun to
> > write code to be executed onto the stack, a nice thing for more secure
> > systems.

 correct, albeit there are at least two caveats;
 one is, as David points out, (pointer-to) GCC nested
 functions;  the other is the MIPS FP trampoline.

> With one caveat, software other than the Linux kernel depends on an
> executable stack (GCC's nested functions for example).  All users of the
> executable stack would have to modified before you could universally
> make the switch.
> 
> That said, we do have RI/XI working well in our kernel (for non-stack
> memory), so it is something we are interested in pursuing.

David,

 I am Very Interested in this.  we also want RI/XI,
 at least for for userland (and, very importantly,
 including the stack), but haven't yet time to deal
 with the issue.  (our platform is the 4KSd, which
 has SmartMIPS (and thus has RI/XI)).

 is what you have at linux-mips.org someplace?

cheers!
        -blf-

-- 
“How many surrealists does it take to   | Brian Foster
 change a lightbulb? Three. One calms   | somewhere in south of France
 the warthog, and two fill the bathtub  |   Stop E$$o (ExxonMobil)!
 with brightly-coloured machine tools.” |      http://www.stopesso.com

<Prev in Thread] Current Thread [Next in Thread>