Commit 3d0883be authored by David Mosberger's avatar David Mosberger Committed by Linus Torvalds

[PATCH] updated version of VM_DATA_DEFAULT_FLAGS patch

Here is the latest version of the VM_DATA_DEFAULT_FLAGS patch
(relative to 2.5.4).

	--david
parent 167c0fd7
......@@ -99,6 +99,9 @@ extern __inline__ int get_order(unsigned long size)
#define VALID_PAGE(page) (((page) - mem_map) < max_mapnr)
#endif /* CONFIG_DISCONTIGMEM */
#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
#endif /* __KERNEL__ */
#endif /* _ALPHA_PAGE_H */
......@@ -106,6 +106,9 @@ static inline int get_order(unsigned long size)
#define VALID_PAGE(page) ((page - mem_map) < max_mapnr)
#endif
#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
#endif
#endif
......@@ -118,6 +118,9 @@ typedef unsigned long pgprot_t;
extern unsigned long dram_start, dram_end;
#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
#endif /* __KERNEL__ */
#endif /* _CRIS_PAGE_H */
......
......@@ -132,6 +132,9 @@ static __inline__ int get_order(unsigned long size)
#define virt_to_page(kaddr) (mem_map + (__pa(kaddr) >> PAGE_SHIFT))
#define VALID_PAGE(page) ((page - mem_map) < max_mapnr)
#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
#endif /* __KERNEL__ */
#endif /* _I386_PAGE_H */
......@@ -148,6 +148,11 @@ get_order (unsigned long size)
# define __pgprot(x) (x)
#endif /* !STRICT_MM_TYPECHECKS */
#define PAGE_OFFSET 0xe000000000000000
#define PAGE_OFFSET 0xe000000000000000
#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | \
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC | \
(((current->thread.flags & IA64_THREAD_XSTACK) != 0) \
? VM_EXEC : 0))
#endif /* _ASM_IA64_PAGE_H */
......@@ -181,6 +181,9 @@ static inline void *__va(unsigned long x)
#endif /* __ASSEMBLY__ */
#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
#endif /* __KERNEL__ */
#endif /* _M68K_PAGE_H */
......@@ -78,6 +78,9 @@ extern __inline__ int get_order(unsigned long size)
#define virt_to_page(kaddr) (mem_map + (__pa(kaddr) >> PAGE_SHIFT))
#define VALID_PAGE(page) ((page - mem_map) < max_mapnr)
#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
#endif /* defined (__KERNEL__) */
#endif /* __ASM_PAGE_H */
......@@ -73,6 +73,9 @@ typedef struct { unsigned long pgprot; } pgprot_t;
#define VALID_PAGE(page) ((page - mem_map) < max_mapnr)
#endif
#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
#endif /* defined (__KERNEL__) */
#endif /* _ASM_PAGE_H */
......@@ -81,6 +81,9 @@ extern __inline__ int get_order(unsigned long size)
#define virt_to_page(kaddr) (mem_map + (__pa(kaddr) >> PAGE_SHIFT))
#define VALID_PAGE(page) ((page - mem_map) < max_mapnr)
#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
#endif /* __KERNEL__ */
#endif /* _PARISC_PAGE_H */
......@@ -137,5 +137,9 @@ extern __inline__ int get_order(unsigned long size)
}
#endif /* __ASSEMBLY__ */
#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
#endif /* __KERNEL__ */
#endif /* _PPC_PAGE_H */
......@@ -120,6 +120,9 @@ typedef struct { unsigned long pgprot; } pgprot_t;
#define virt_to_page(kaddr) (mem_map + (__pa(kaddr) >> PAGE_SHIFT))
#define VALID_PAGE(page) ((page - mem_map) < max_mapnr)
#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
#endif /* __KERNEL__ */
#endif /* _S390_PAGE_H */
......@@ -117,6 +117,9 @@ typedef struct { unsigned long pgprot; } pgprot_t;
#define virt_to_page(kaddr) (mem_map + (__pa(kaddr) >> PAGE_SHIFT))
#define VALID_PAGE(page) ((page - mem_map) < max_mapnr)
#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
#endif /* __KERNEL__ */
#endif /* _S390_PAGE_H */
......@@ -179,6 +179,9 @@ extern __inline__ int get_order(unsigned long size)
#define virt_to_page(kaddr) (mem_map + (__pa(kaddr) >> PAGE_SHIFT))
#define VALID_PAGE(page) ((page - mem_map) < max_mapnr)
#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
#endif /* __KERNEL__ */
#endif /* _SPARC_PAGE_H */
......@@ -153,6 +153,9 @@ extern __inline__ int get_order(unsigned long size)
#endif /* !(__ASSEMBLY__) */
#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
#endif /* !(__KERNEL__) */
#endif /* !(_SPARC64_PAGE_H) */
......@@ -1046,10 +1046,7 @@ unsigned long do_brk(unsigned long addr, unsigned long len)
if (!vm_enough_memory(len >> PAGE_SHIFT))
return -ENOMEM;
flags = calc_vm_flags(PROT_READ|PROT_WRITE|PROT_EXEC,
MAP_FIXED|MAP_PRIVATE) | mm->def_flags;
flags |= VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC;
flags = VM_DATA_DEFAULT_FLAGS | mm->def_flags;
/* Can we just expand an old anonymous mapping? */
if (rb_parent && vma_merge(mm, prev, rb_parent, addr, addr + len, flags))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment