kernel hangs after running program that uses a custom SIGSEGV handler

Alexandre Ghiti alex at ghiti.fr
Fri Apr 13 03:09:41 PDT 2018


Hi Stef,

I'm happy to see there are solutions to this problem: I have a working 
port of hugetlb for riscv-linux and I was wondering how to support 
PROT_NONE.
Can you share a link to the patches you mention please ?

Thanks,

Alex


On 04/12/2018 02:14 AM, Stef O'Rear wrote:
> On Wed, Apr 11, 2018 at 6:10 PM, Bruno Haible <bruno at clisp.org> wrote:
>> Hi,
>>
>> $ uname
>> Linux stage4.fedoraproject.org 4.16.0-rc2-00328-gebea62367bc4 #4 SMP Mon Feb 26 16:05:16 GMT 2018 riscv64 riscv64 riscv64 GNU/Linux
>>
>> This kernel either hangs or prints "BUG" messages when running a program that
>> installs a SIGSEGV handler. That handler uses mprotect to change the access
>> permissions of memory pages. It is known to work fine on all other Linux
>> architectures that I tested.
> The bug is caused by mishandling of PROT_NONE (failing to distinguish
> between PROT_NONE and non-present pages), not by the segfault handler.
> I sent a patch for this to Andrew and Richard a few weeks ago but
> haven't had a chance to follow up.
>
> -s
>
> _______________________________________________
> linux-riscv mailing list
> linux-riscv at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-riscv




More information about the linux-riscv mailing list