linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Kefeng Wang <wangkefeng.wang@huawei.com>
To: <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: Dinh Nguyen <dinguyen@kernel.org>,
	Jarkko Sakkinen <jarkko@kernel.org>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	<linux-sgx@vger.kernel.org>, <amd-gfx@lists.freedesktop.org>,
	<linux-mm@kvack.org>, Kefeng Wang <wangkefeng.wang@huawei.com>
Subject: [PATCH 4/5] mm: debug_vm_pgtable: use VM_ACCESS_FLAGS
Date: Wed, 19 Oct 2022 11:49:44 +0800	[thread overview]
Message-ID: <20221019034945.93081-5-wangkefeng.wang@huawei.com> (raw)
In-Reply-To: <20221019034945.93081-1-wangkefeng.wang@huawei.com>

Directly use VM_ACCESS_FLAGS instead VMFLAGS.

Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 mm/debug_vm_pgtable.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/mm/debug_vm_pgtable.c b/mm/debug_vm_pgtable.c
index dc7df1254f0a..2b61fde8c38c 100644
--- a/mm/debug_vm_pgtable.c
+++ b/mm/debug_vm_pgtable.c
@@ -38,11 +38,7 @@
  * Please refer Documentation/mm/arch_pgtable_helpers.rst for the semantics
  * expectations that are being validated here. All future changes in here
  * or the documentation need to be in sync.
- */
-
-#define VMFLAGS	(VM_READ|VM_WRITE|VM_EXEC)
-
-/*
+ *
  * On s390 platform, the lower 4 bits are used to identify given page table
  * entry type. But these bits might affect the ability to clear entries with
  * pxx_clear() because of how dynamic page table folding works on s390. So
@@ -1125,7 +1121,7 @@ static int __init init_args(struct pgtable_debug_args *args)
 	 */
 	memset(args, 0, sizeof(*args));
 	args->vaddr              = get_random_vaddr();
-	args->page_prot          = vm_get_page_prot(VMFLAGS);
+	args->page_prot          = vm_get_page_prot(VM_ACCESS_FLAGS);
 	args->page_prot_none     = vm_get_page_prot(VM_NONE);
 	args->is_contiguous_page = false;
 	args->pud_pfn            = ULONG_MAX;
-- 
2.35.3



  parent reply	other threads:[~2022-10-19  3:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-19  3:49 [PATCH 0/5] mm: cleanup with VM_ACCESS_FLAGS Kefeng Wang
2022-10-19  3:49 ` [PATCH 1/5] nios2: remove unused INIT_MMAP Kefeng Wang
2022-10-19  3:49 ` [PATCH 2/5] x86/sgx: use VM_ACCESS_FLAGS Kefeng Wang
2022-10-23 20:07   ` Jarkko Sakkinen
2022-10-23 20:09     ` Jarkko Sakkinen
2022-10-19  3:49 ` [PATCH 3/5] mm: mprotect: " Kefeng Wang
2022-10-19  3:49 ` Kefeng Wang [this message]
2022-10-19  3:49 ` [PATCH 5/5] amdgpu: " Kefeng Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221019034945.93081-5-wangkefeng.wang@huawei.com \
    --to=wangkefeng.wang@huawei.com \
    --cc=akpm@linux-foundation.org \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=dave.hansen@linux.intel.com \
    --cc=dinguyen@kernel.org \
    --cc=jarkko@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-sgx@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox