From patchwork Wed Oct 19 03:49:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 4431 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp108672wrs; Tue, 18 Oct 2022 20:35:14 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4/afV9lDICCoW2NmQZV/BN3+0/gRNGAtuVBKAOWAxT/J/EVjkoi4en/1jVZtErmI0b9o1X X-Received: by 2002:a17:906:fe49:b0:73d:70c5:1a52 with SMTP id wz9-20020a170906fe4900b0073d70c51a52mr4986522ejb.469.1666150513922; Tue, 18 Oct 2022 20:35:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666150513; cv=none; d=google.com; s=arc-20160816; b=yiJj7H0oLNA/VCqJx++vOy858xfnAafb1ZtXf0txgCP+JpEEJzNwvgnsbldrw2Ma8o j7lA8nnSvDZ7dLuNjLwSvMuIEvyEUKph52arvpp9VIq3l4slb5IUEXrB6DV6envmjy+5 wfY8PKKyQqGJnV+Z+HaHEx0qkO3hWgo5NvtwEawdDpcPnz2NPYBNMjjdQpEViBWBbdS4 E9b3NGdqMwlHMnzx+5jQAzys+H/TQUW9l5oc3faBtiqXJWmZ19dIGVVG2rSzCesf44II xPkMOOK7FwXMAyp0Wqx07ANfhVXbMSc2p/m1Xfu57qcWecDgjEs6zCBZppR+AhHZqq7w f05w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=ZOHu4WLNeTFWtwTh3s0cuZmAqBO2WfUNWuJ1+8gPM88=; b=NiysDifelm6/Z4evpmvd9FuYg9SQEuFK9BmG3NIwaEZaXlH61OizDmK1A0QDnmV5LI 5OiaWXZKfRA10HirDWGOwnmXfAcOwkisfa6R3p6lX4rkrzxQoDIIFZDXt3VKRyPALo0w /lCiuR9/k9pw9c1J643lJJ0kFiIH4XH0pC7HWK+HhYqjM3ruC2dIlm8COZ2nvNeM8Lfv 0v6qXhQ8ma+nBSZbEXlNh7GZ8eqqC23gAPA/ADc9HHpFubobKz1ObYzoHzuzuPa6/1rh lpVJO2ndJzwOvQdHZ1ufKmIcQPbERJOd3NLHOH6LrYmysYonGjX93fALaHUvanegG1Ut 7T8Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t20-20020a1709066bd400b00783698dd8b4si11574616ejs.722.2022.10.18.20.34.48; Tue, 18 Oct 2022 20:35:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229779AbiJSDaN (ORCPT + 99 others); Tue, 18 Oct 2022 23:30:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44352 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229799AbiJSDaC (ORCPT ); Tue, 18 Oct 2022 23:30:02 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3C2293B9B5; Tue, 18 Oct 2022 20:30:00 -0700 (PDT) Received: from dggpemm500020.china.huawei.com (unknown [172.30.72.54]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4Msbk81L6QznTV5; Wed, 19 Oct 2022 11:26:40 +0800 (CST) Received: from dggpemm500001.china.huawei.com (7.185.36.107) by dggpemm500020.china.huawei.com (7.185.36.49) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Wed, 19 Oct 2022 11:29:58 +0800 Received: from localhost.localdomain.localdomain (10.175.113.25) by dggpemm500001.china.huawei.com (7.185.36.107) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Wed, 19 Oct 2022 11:29:57 +0800 From: Kefeng Wang To: , Andrew Morton CC: Dinh Nguyen , Jarkko Sakkinen , Dave Hansen , , , , Kefeng Wang Subject: [PATCH 4/5] mm: debug_vm_pgtable: use VM_ACCESS_FLAGS Date: Wed, 19 Oct 2022 11:49:44 +0800 Message-ID: <20221019034945.93081-5-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20221019034945.93081-1-wangkefeng.wang@huawei.com> References: <20221019034945.93081-1-wangkefeng.wang@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To dggpemm500001.china.huawei.com (7.185.36.107) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747085441297861716?= X-GMAIL-MSGID: =?utf-8?q?1747085441297861716?= Directly use VM_ACCESS_FLAGS instead VMFLAGS. Signed-off-by: Kefeng Wang --- 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;