[to-be-updated] mm-debug_vm_pgtable-dont-use-__p000-directly.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: mm: debug_vm_pgtable: Don't use __P000 directly
has been removed from the -mm tree.  Its filename was
     mm-debug_vm_pgtable-dont-use-__p000-directly.patch

This patch was dropped because an updated version will be merged

------------------------------------------------------
From: Guo Ren <guoren@xxxxxxxxxxxxxxxxx>
Subject: mm: debug_vm_pgtable: Don't use __P000 directly

The __Pxxx/__Sxxx macros are only for init protection_map[].  All usage of
them in linux should come from protection_map array.

Because a lot of architectures would re-initilize protection_map[] array,
eg: x86-mem_encrypt, m68k-motorola, mips, arm, sparc.

Using __P000 maybe won't cause bug because hw would deny access with
PROT_NONE permission, but it's not rigorous.

Link: https://lkml.kernel.org/r/20210921201815.284412-1-guoren@xxxxxxxxxx
Signed-off-by: Guo Ren <guoren@xxxxxxxxxxxxxxxxx>
Cc: Gavin Shan <gshan@xxxxxxxxxx>
Cc: Anshuman Khandual <anshuman.khandual@xxxxxxx>
Cc: Christophe Leroy <christophe.leroy@xxxxxxxxxx>
Cc: Gerald Schaefer <gerald.schaefer@xxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/debug_vm_pgtable.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/mm/debug_vm_pgtable.c~mm-debug_vm_pgtable-dont-use-__p000-directly
+++ a/mm/debug_vm_pgtable.c
@@ -1104,13 +1104,13 @@ static int __init init_args(struct pgtab
 	/*
 	 * Initialize the debugging data.
 	 *
-	 * __P000 (or even __S000) will help create page table entries with
+	 * __P000 (protection_map[0]) will help create page table entries with
 	 * PROT_NONE permission as required for pxx_protnone_tests().
 	 */
 	memset(args, 0, sizeof(*args));
 	args->vaddr              = get_random_vaddr();
 	args->page_prot          = vm_get_page_prot(VMFLAGS);
-	args->page_prot_none     = __P000;
+	args->page_prot_none     = protection_map[0];
 	args->is_contiguous_page = false;
 	args->pud_pfn            = ULONG_MAX;
 	args->pmd_pfn            = ULONG_MAX;
_

Patches currently in -mm which might be from guoren@xxxxxxxxxxxxxxxxx are





[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux