This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH resend] MIPS: Allow FPU emulator to use non-stack area.
- From: Andy Lutomirski <luto at amacapital dot net>
- To: David Daney <ddaney dot cavm at gmail dot com>
- Cc: David Daney <david dot daney at cavium dot com>, Rich Felker <dalias at libc dot org>, David Daney <david dot s dot daney at gmail dot com>, Matthew Fortune <Matthew dot Fortune at imgtec dot com>, "linux-kernel at vger dot kernel dot org" <linux-kernel at vger dot kernel dot org>, "libc-alpha at sourceware dot org" <libc-alpha at sourceware dot org>, Leonid Yegoshin <Leonid dot Yegoshin at imgtec dot com>, "linux-mips at linux-mips dot org" <linux-mips at linux-mips dot org>
- Date: Tue, 7 Oct 2014 17:22:01 -0700
- Subject: Re: [PATCH resend] MIPS: Allow FPU emulator to use non-stack area.
- Authentication-results: sourceware.org; auth=none
- References: <54332A64 dot 5020605 at caviumnetworks dot com> <20141007000514 dot GD23797 at brightrain dot aerifal dot cx> <543334CE dot 8060305 at caviumnetworks dot com> <20141007004915 dot GF23797 at brightrain dot aerifal dot cx> <54337127 dot 40806 at gmail dot com> <6D39441BF12EF246A7ABCE6654B0235320F1E173 at LEMAIL01 dot le dot imgtec dot org> <543431DA dot 4090809 at imgtec dot com> <CALCETrUQEbb=DotSzsneN7Hano_eC-EoTMko6uKcyZXvEcktkw at mail dot gmail dot com> <20141007190943 dot GM23797 at brightrain dot aerifal dot cx> <54343C2B dot 2080801 at imgtec dot com> <20141007192107 dot GN23797 at brightrain dot aerifal dot cx> <CALCETrU8qPL1qKGk7FqM=LCnoeSfuwDV_bG_a=5zcOKtWfkdGw at mail dot gmail dot com> <54344714 dot 1000600 at gmail dot com>
On Oct 7, 2014 1:03 PM, "David Daney" <ddaney.cavm@gmail.com> wrote:
>
> On 10/07/2014 12:28 PM, Andy Lutomirski wrote:
>>
>> On Tue, Oct 7, 2014 at 12:21 PM, Rich Felker <dalias@libc.org> wrote:
>>>
>>> On Tue, Oct 07, 2014 at 12:16:59PM -0700, Leonid Yegoshin wrote:
>>>>
>>>> On 10/07/2014 12:09 PM, Rich Felker wrote:
>>>>>
>>>>> I agree completely here. We should not break things (or, as it
>>>>> seems, leave them broken) for common usage cases that affect
>>>>> everyone just to coddle proprietary vendor-specific instructions.
>>>>> The latter just should not be used in delay slots unless the chip
>>>>> vendor also promises to provide fpu branch in hardware. Rich
>>>>
>>>> And what do you propose - remove a current in-stack emulation and
>>>> you still think it doesn't break a status-quo?
>>>
>>>
>>> The in-stack trampoline support could be left but used only for
>>> emulating instructions the kernel doesn't know. This would make all
>>> normal binaries immediately usable with non-executable stack, and
>>> would avoid the only potential source of regressions. Ultimately I
>>> think the "xol" stuff should be removed, but that could be a long term
>>> goal.
>>
>>
>> Does anything break if the xol stuff is disabled for PT_GNU_STACK tasks?
>>
>
> The instructions must be executed, if you turn on a non-executable stack, you cannot execute them on the stack, so they must be handled in another way, which is the subject of this thread.
>
> Options:
>
> 1a) XOL kernel manages the memory
> 1b) XOL userspace manages the menory
> 2) Emulate the instructions.
> 3) I don't think there is a 3rd. option.
4) SIGILL
5) single-step or use an HW breakpoint if available
But, yes, 3 seems reasonable.
--Andy