|
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); +#else + ptr = prx = mmap (NULL, size, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE, fd, 0); +#endifMight 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 Herman
[Prev in Thread] | Current Thread | [Next in Thread] |