[openfirmware] [commit] r3594 - forth/wrapper
repository service
svn at openfirmware.info
Wed Mar 6 20:53:53 CET 2013
Author: wmb
Date: Wed Mar 6 20:53:52 2013
New Revision: 3594
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/3594
Log:
wrapper.c - added commentary telling another way to accomplish
the same result as mprotect()ing the dictionary memory to make
it executable.
Modified:
forth/wrapper/wrapper.c
Modified: forth/wrapper/wrapper.c
==============================================================================
--- forth/wrapper/wrapper.c Wed Mar 6 19:55:27 2013 (r3593)
+++ forth/wrapper/wrapper.c Wed Mar 6 20:53:52 2013 (r3594)
@@ -2201,6 +2201,13 @@
return 0L;
#endif
#if defined(__linux__) && defined(ARM)
+ /* There is another way to achieve the goal of making the */
+ /* dictionary executable. You can add "-Wl,-z,execstack" */
+ /* to the cc command line or add "-z execstack" to the ld */
+ /* command line. mprotect() is perhaps more precise, making */
+ /* only the dictionary executable while leaving the stack */
+ /* protected, although that is probably pointless since */
+ /* the whole point of this program is code injection. */
mprotect(adr, len, PROT_READ | PROT_WRITE | PROT_EXEC);
__clear_cache(adr, adr+len);
return 0L;
More information about the openfirmware
mailing list