Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: David Daney <ddaney@avtrex.com>
To: Thiemo Seufer <ths@networkno.de>
Cc: Brian Foster <brian.foster@innova-card.com>,
	"Kevin D. Kissell" <KevinK@paralogos.com>,
	Andrew Dyer <adyer@righthandtech.com>,
	linux-mips@linux-mips.org
Subject: Re: Adding(?) XI support to MIPS-Linux?
Date: Tue, 10 Jun 2008 09:21:42 -0700	[thread overview]
Message-ID: <484EAA16.80903@avtrex.com> (raw)
In-Reply-To: <20080610095702.GG11233@networkno.de>

Thiemo Seufer wrote:
> Brian Foster wrote:
> [snip]
>   
>>  2) Kevin D. Kissell wrote:
>>  2)[ ... ]
>>  2) > Well, strictly speaking, you wouldn't actually *need* to modify
>>  2) > binutils to make specially tagged binaries.  [ ... ]
>>  2)
>>  2) This exists already in ld's -z execstack/noexecstack feature.
>>
>> Good point.  Thanks for the reminder.
>>
>>  2) It is not used by default because too many things depend on executable
>>  2) stacks on MIPS.
>>
>> Ah!  Can you be more specific please?  At the present time
>> I'm only aware of three situations where executable stacks
>> are magically used ("magic" meaning it's being done without
>> the programmer explicitly coding it):
>>
>>   1. sigreturn.
>>   2. something to do with FPU emulation?
>>   3. pointer to a nested function (gcc extension).
>>     
>
> Those, plus manually coded trampolines in e.g. foreign function
> interfacing (which are typically hidden in some library). I don't
> know if you can ignore that completely. :-)
>
>   
The trampolines in libffi are user allocated, so there is a choice of 
where to place them.  In libgcj (which uses the libffi trampolines) the 
trampolines are allocated on the heap and care is taken to set the 
execute permissions on the memory in question.  Other users may have 
problems, but by now most code should work as XI support has been 
present on x86 for quite some time now.

As long as there is a mechanism to make user space stacks (and heap) 
executable, there should be no problem.  People running code that 
requires it can switch off the XI support.

David Daney
>> And, significantly, I am do not know of any need for the
>> kernel-mode stacks to be executable.  Except, perhaps,
>> for case 3, the above are (should be?) user-land only.
>>     
>
> AFAIK nested functions are frowned upon in kernelspace.
>
>
> Thiemo
>
>   

  reply	other threads:[~2008-06-10 16:21 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200806091658.10937.brian.foster@innova-card.com>
2008-06-09 15:37 ` Re: Adding(?) XI support to MIPS-Linux? Brian Foster
2008-06-09 19:32   ` Kevin D. Kissell
2008-06-09 20:46     ` Thiemo Seufer
     [not found]       ` <200806101119.06227.brian.foster@innova-card.com>
2008-06-10  9:32         ` Brian Foster
2008-06-10  9:57           ` Thiemo Seufer
2008-06-10 16:21             ` David Daney [this message]
2008-06-11 13:16               ` Brian Foster
2008-06-11 18:51                 ` Kevin D. Kissell
2008-06-12 12:03                   ` Brian Foster
2008-06-18  8:42                 ` Brian Foster
2008-06-18  9:36                   ` Kevin D. Kissell
2008-06-18  9:45                     ` Brian Foster
2008-06-11  9:06     ` Ralf Baechle
2008-06-11  9:35       ` Kevin D. Kissell
     [not found] <200806091050.m59AoUUl014012@smtp02.msg.oleane.net>
2008-06-09 10:55 ` Brian Foster

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=484EAA16.80903@avtrex.com \
    --to=ddaney@avtrex.com \
    --cc=KevinK@paralogos.com \
    --cc=adyer@righthandtech.com \
    --cc=brian.foster@innova-card.com \
    --cc=linux-mips@linux-mips.org \
    --cc=ths@networkno.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox