On Mon, Mar 29, 2010 at 8:16 PM, Dr. David Kirkby
<david.kir...@onetel.net> wrote:
> I don't know how practical it is going to be for a Sage developer to change
> the the source code of PARI, NTL and whatever else has this problem, to add
> mprotect() where needed. I suspect that might be a bit difficult, and
> perhaps slow the code.

uh?

> The reason I used that code was to check if executing the stack caused a
> problem. As such, there was little point in me adding mprotect - it rather
> defeated the object of the program.

I presume that the software which wants to execute code in the stack
makes the call the mprotect as needed.

The proper code (with the call to mprotect) shows that executing the
stack doesn't cause a problem, if you follow the posix standard [
stack is not executable by default (only this wasn't enforced before
cpus had NX support). ] YMMV, but you didn't post any evidence on the
contrary.

Did you try the fixed code (i.e. with call to mprotect) both in a
non-SELinux and a SELinux enabled kernel to see if there actually is a
difference? Running the code under strace(1) may help know what is
going on. I'd guess that SELinux will return EACCESS in the mprotect
call...

Gonzalo

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

To unsubscribe from this group, send email to 
sage-devel+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.

Reply via email to