aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-ppc64/page.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-ppc64/page.h')
-rw-r--r--include/asm-ppc64/page.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/include/asm-ppc64/page.h b/include/asm-ppc64/page.h
index 20e0f19324e8..86219574c1a5 100644
--- a/include/asm-ppc64/page.h
+++ b/include/asm-ppc64/page.h
@@ -252,10 +252,19 @@ extern u64 ppc64_pft_size; /* Log 2 of page table size */
252 252
253/* 253/*
254 * This is the default if a program doesn't have a PT_GNU_STACK 254 * This is the default if a program doesn't have a PT_GNU_STACK
255 * program header entry. 255 * program header entry. The PPC64 ELF ABI has a non executable stack
256 * stack by default, so in the absense of a PT_GNU_STACK program header
257 * we turn execute permission off.
256 */ 258 */
257#define VM_STACK_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ 259#define VM_STACK_DEFAULT_FLAGS32 (VM_READ | VM_WRITE | VM_EXEC | \
258 VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) 260 VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
261
262#define VM_STACK_DEFAULT_FLAGS64 (VM_READ | VM_WRITE | \
263 VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
264
265#define VM_STACK_DEFAULT_FLAGS \
266 (test_thread_flag(TIF_32BIT) ? \
267 VM_STACK_DEFAULT_FLAGS32 : VM_STACK_DEFAULT_FLAGS64)
259 268
260#endif /* __KERNEL__ */ 269#endif /* __KERNEL__ */
261#endif /* _PPC64_PAGE_H */ 270#endif /* _PPC64_PAGE_H */