mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 05:31:08 -04:00
mm/mmap: build protect protection_map[] with ARCH_HAS_VM_GET_PAGE_PROT
Now that protection_map[] has been moved inside those platforms that enable ARCH_HAS_VM_GET_PAGE_PROT. Hence generic protection_map[] array now can be protected with CONFIG_ARCH_HAS_VM_GET_PAGE_PROT intead of __P000. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Anshuman Khandual <[email protected]> Reviewed-by: Christophe Leroy <[email protected]> Cc: Arnd Bergmann <[email protected]> Cc: Brian Cain <[email protected]> Cc: Catalin Marinas <[email protected]> Cc: Christoph Hellwig <[email protected]> Cc: Christoph Hellwig <[email protected]> Cc: Chris Zankel <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: Dinh Nguyen <[email protected]> Cc: Geert Uytterhoeven <[email protected]> Cc: Guo Ren <[email protected]> Cc: Heiko Carstens <[email protected]> Cc: Huacai Chen <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: "James E.J. Bottomley" <[email protected]> Cc: Jeff Dike <[email protected]> Cc: Jonas Bonn <[email protected]> Cc: Michael Ellerman <[email protected]> Cc: Michal Simek <[email protected]> Cc: Nicholas Piggin <[email protected]> Cc: Palmer Dabbelt <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Paul Walmsley <[email protected]> Cc: Richard Henderson <[email protected]> Cc: Rich Felker <[email protected]> Cc: Russell King <[email protected]> Cc: Sam Ravnborg <[email protected]> Cc: Stafford Horne <[email protected]> Cc: Thomas Bogendoerfer <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Vasily Gorbik <[email protected]> Cc: Vineet Gupta <[email protected]> Cc: WANG Xuerui <[email protected]> Cc: Will Deacon <[email protected]> Cc: Yoshinori Sato <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
This commit is contained in:
1 parent
4867fbbdd6
commit
09095f7413
2 files changed
+2
-5
No files matched your search
+1
-1
@@ -425,7 +425,7 @@ extern unsigned int kobjsize(const void *objp);
|
||||
* mapping from the currently active vm_flags protection bits (the
|
||||
* low four bits) to a page protection mask..
|
||||
*/
|
||||
#ifdef __P000
|
||||
#ifndef CONFIG_ARCH_HAS_VM_GET_PAGE_PROT
|
||||
extern pgprot_t protection_map[16];
|
||||
#endif
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ static void unmap_region(struct mm_struct *mm,
|
||||
struct vm_area_struct *vma, struct vm_area_struct *prev,
|
||||
unsigned long start, unsigned long end);
|
||||
|
||||
#ifdef __P000
|
||||
#ifndef CONFIG_ARCH_HAS_VM_GET_PAGE_PROT
|
||||
pgprot_t protection_map[16] __ro_after_init = {
|
||||
[VM_NONE] = __P000,
|
||||
[VM_READ] = __P001,
|
||||
@@ -100,9 +100,6 @@ pgprot_t protection_map[16] __ro_after_init = {
|
||||
[VM_SHARED | VM_EXEC | VM_WRITE] = __S110,
|
||||
[VM_SHARED | VM_EXEC | VM_WRITE | VM_READ] = __S111
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_ARCH_HAS_VM_GET_PAGE_PROT
|
||||
DECLARE_VM_GET_PAGE_PROT
|
||||
#endif /* CONFIG_ARCH_HAS_VM_GET_PAGE_PROT */
|
||||
|
||||
|
||||
Reference in new issue
Block a user