[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] Fix boundschecking for signal/sigaction/fork

From: Herman ten Brugge
Subject: Re: [Tinycc-devel] Fix boundschecking for signal/sigaction/fork
Date: Fri, 18 Sep 2020 19:19:49 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0

On 2020-09-17 22:28, grischka wrote:
Herman ten Brugge via Tinycc-devel wrote:
+#if 0 /* does not work with fork */
     ptr = mmap (NULL, size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
     prx = mmap (NULL, size, PROT_READ|PROT_EXEC, MAP_SHARED, fd, 0);
+    ptr = prx = mmap (NULL, size, PROT_READ|PROT_WRITE|PROT_EXEC,
MAP_PRIVATE, fd, 0);

Might depend on what selinux features you have enabled but IIRC
alpine musl for example did not allow to run code from memory
that once was allocated as writable.

Thanks for the quick response.
I use fedora (32) and see no problem here.
But if it fails on another platform I will not commit the patch


reply via email to

[Prev in Thread] Current Thread [Next in Thread]