@@ -87,12 +87,13 @@ EXPORT_SYMBOL(elf_set_personality);
* ELF: | | |
* -------------------------------|------------|
* missing GNU_STACK | exec-all | exec-all |
- * GNU_STACK == RWX | exec-all | exec-all |
+ * GNU_STACK == RWX | exec-all | exec-stack |
* GNU_STACK == RW | exec-all | exec-none |
*
* exec-all : all PROT_READ user mappings are executable, except when
* backed by files on a noexec-filesystem.
* exec-none : only PROT_EXEC user mappings are executable.
+ * exec-stack: only the stack and PROT_EXEC user mappings are executable.
*
* *this column has no architectural effect: NX markings are ignored by
* hardware, but may have behavioral effects when "wants X" collides with
@@ -102,7 +103,7 @@ EXPORT_SYMBOL(elf_set_personality);
*/
int arm_elf_read_implies_exec(int executable_stack)
{
- if (executable_stack != EXSTACK_DISABLE_X)
+ if (executable_stack == EXSTACK_DEFAULT)
return 1;
if (cpu_architecture() < CPU_ARCH_ARMv6)
return 1;
@@ -106,17 +106,18 @@
* ELF: | | |
* -------------------------------|------------|
* missing GNU_STACK | exec-all | exec-all |
- * GNU_STACK == RWX | exec-all | exec-all |
+ * GNU_STACK == RWX | exec-stack | exec-stack |
* GNU_STACK == RW | exec-none | exec-none |
*
* exec-all : all PROT_READ user mappings are executable, except when
* backed by files on a noexec-filesystem.
* exec-none : only PROT_EXEC user mappings are executable.
+ * exec-stack: only the stack and PROT_EXEC user mappings are executable.
*
* *all arm64 CPUs support NX, so there is no "lacks NX" column.
*
*/
-#define elf_read_implies_exec(ex,stk) (stk != EXSTACK_DISABLE_X)
+#define elf_read_implies_exec(ex,stk) (stk == EXSTACK_DEFAULT)
#define CORE_DUMP_USE_REGSET
#define ELF_EXEC_PAGESIZE PAGE_SIZE