|
From: | Seth Goldberg |
Subject: | Re: Non-static variables and nested function pointers [bug #28392] |
Date: | Wed, 23 Dec 2009 19:50:25 -0800 (PST) |
User-agent: | Alpine 2.00 (GSO 1167 2008-08-23) |
Quoting Grégoire Sutre, who wrote the following on Thu, 24 Dec 2009:
Seth Goldberg wrote:Exactly -- the presence of the execstack attribute in the segment is merely a request -- the kernel is free to discard it, and many OSes do, as you've found :).The problem is more complex: I tried a simple example with a pointer to a nested function, and it runs without any segfault on NetBSD/i386. This would suggest that, by default, the stack is executable -- at least if trampolines are used?
It depends how the page tables are configured on that kernel -- if the NX bit isn't being set in page table entries on that platform, then the hardware support for execute-protection isn't enabled and you won't get any faults.
--S
[Prev in Thread] | Current Thread | [Next in Thread] |