[PATCH] Allow exec on 32-bit from readable, non-exec pages, with a warning.

Scott Wood scottwood at freescale.com
Tue Jul 10 07:16:40 EST 2007


Arnd Bergmann wrote:
> On Monday 09 July 2007, Scott Wood wrote:
> 
>>In older versions of glibc (through 2.3), the dynamic linker executes a
>>small amount of code from the data segment, which is not marked as
>>executable.  A recent change (commit 9ba4ace39fdfe22268daca9f28c5df384ae462cf)
>>stops this from working; there should be a deprecation period before
>>older glibc versions stop working.
>>
>>The problem has been observed on glibc 2.2.  While glibc 2.3 has the same
>>code, I did not see the problem; it may be that it accesses the page in
>>question as data before executing from it, and thus it is already mapped.
> 
> 
> I may be missing the obvious, but doesn't that defeat the purpose of
> non-executable mappings?

The hardware in question doesn't support non-executable mappings; 
otherwise, it'd never have worked in the first place.  Note that this is 
only allowed on 32-bit, non-book-E.

There isn't much value in enforcing non-exec mappings only if it happens 
to be the first fault on a given page.

-Scott



More information about the Linuxppc-dev mailing list