On Fri, Sep 30, 2016 at 10:58 AM, Andy Lutomirski <[email protected]> wrote:
> Jann Horn noticed that KSTK_ESP + eager task stack freeing was a bad
> combination and could crash. I could very easily fix it to not
> crash, but I think that using KSTK_ESP on a remote task is
> questionable in general. Therefore, I propose to get rid of the
> major users for 4.9.
Ping!
We need to decide fairly soon whether to apply these (or perhaps just
patch 1 or just patches 2 and 3) for 4.9. For any parts that aren't
applied, I'll send quick fixups to pin the stack in the offending
code.
--Andy
On Mon, Oct 3, 2016 at 4:08 PM, Andy Lutomirski <[email protected]> wrote:
>
> Ping!
>
> We need to decide fairly soon whether to apply these (or perhaps just
> patch 1 or just patches 2 and 3) for 4.9. For any parts that aren't
> applied, I'll send quick fixups to pin the stack in the offending
> code.
I think we should apply it. Hopefully nothing uses it, and nobody will
notice. And if somebody *does* notice, the sooner we find out, the
better.
Linus
My personal opinion is that even looking at esp/rsp is asking for
trouble. The only reliable information is VM_STACK or another VM flag
that makes the area expand in response to stack growth.
Besides, userspace could always play funky trampoline games with the
stack pointer, or even dynamically expand the stack by doing a malloc
if a stack overflow draws near, which would put the stack in the data
section temporarily.
As long as esp is in the bounds of a valid VMA, my vote is that we
should consider it undefined how the task uses it.
On Mon, Oct 3, 2016 at 4:17 PM, Linus Torvalds
<[email protected]> wrote:
> On Mon, Oct 3, 2016 at 4:08 PM, Andy Lutomirski <[email protected]>
> wrote:
>>
>> Ping!
>>
>> We need to decide fairly soon whether to apply these (or perhaps
>> just
>> patch 1 or just patches 2 and 3) for 4.9. For any parts that aren't
>> applied, I'll send quick fixups to pin the stack in the offending
>> code.
>
> I think we should apply it. Hopefully nothing uses it, and nobody will
> notice. And if somebody *does* notice, the sooner we find out, the
> better.
>
> Linus
On Mon, Oct 3, 2016 at 4:17 PM, Linus Torvalds
<[email protected]> wrote:
> On Mon, Oct 3, 2016 at 4:08 PM, Andy Lutomirski <[email protected]> wrote:
>>
>> Ping!
>>
>> We need to decide fairly soon whether to apply these (or perhaps just
>> patch 1 or just patches 2 and 3) for 4.9. For any parts that aren't
>> applied, I'll send quick fixups to pin the stack in the offending
>> code.
>
> I think we should apply it. Hopefully nothing uses it, and nobody will
> notice. And if somebody *does* notice, the sooner we find out, the
> better.
>
Ingo? If we're going to make this change, I think it would be nice to
do it before -rc1. If not, I want to get the alternate fix in ASAP.