From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 72C23C433EF for ; Mon, 18 Apr 2022 06:12:18 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B02628D0005; Mon, 18 Apr 2022 02:12:17 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id AB2D28D0002; Mon, 18 Apr 2022 02:12:17 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 979EB8D0005; Mon, 18 Apr 2022 02:12:17 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.26]) by kanga.kvack.org (Postfix) with ESMTP id 850278D0002 for ; Mon, 18 Apr 2022 02:12:17 -0400 (EDT) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 4D72D24178 for ; Mon, 18 Apr 2022 06:12:17 +0000 (UTC) X-FDA: 79368979914.03.D8341C4 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by imf08.hostedemail.com (Postfix) with ESMTP id 2CDE9160002 for ; Mon, 18 Apr 2022 06:12:16 +0000 (UTC) Received: from kwepemi100002.china.huawei.com (unknown [172.30.72.57]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4Khc3B69nnzFptq; Mon, 18 Apr 2022 14:09:42 +0800 (CST) Received: from kwepemm600017.china.huawei.com (7.193.23.234) by kwepemi100002.china.huawei.com (7.221.188.188) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Mon, 18 Apr 2022 14:12:11 +0800 Received: from [10.174.179.234] (10.174.179.234) by kwepemm600017.china.huawei.com (7.193.23.234) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Mon, 18 Apr 2022 14:12:10 +0800 Message-ID: <0b023809-8138-a44f-83e2-db54a7446954@huawei.com> Date: Mon, 18 Apr 2022 14:12:09 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Subject: Re: [PATCH -next v4 0/4]mm: page_table_check: add support on arm64 and riscv To: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , , "H. Peter Anvin" , Pasha Tatashin , Andrew Morton , Catalin Marinas , Will Deacon , Paul Walmsley , Palmer Dabbelt , Albert Ou CC: , , , , Kefeng Wang , Guohanjun References: <20220418034444.520928-1-tongtiangen@huawei.com> From: Tong Tiangen In-Reply-To: <20220418034444.520928-1-tongtiangen@huawei.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.174.179.234] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To kwepemm600017.china.huawei.com (7.193.23.234) X-CFilter-Loop: Reflected Authentication-Results: imf08.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf08.hostedemail.com: domain of tongtiangen@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=tongtiangen@huawei.com X-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 2CDE9160002 X-Stat-Signature: 96udhixjkrkciiw3ysn43h69j7ymiej1 X-HE-Tag: 1650262336-851702 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Hi Andrew, Catalin, Palmer: This patch modifies the code related to the mm/x86/arm64/riscv, who can help me merge it if no object, Maybe Andrew is more appropriate? Thanks, Tong. 在 2022/4/18 11:44, Tong Tiangen 写道: > Page table check performs extra verifications at the time when new > pages become accessible from the userspace by getting their page > table entries (PTEs PMDs etc.) added into the table. It is supported > on X86[1]. > > This patchset made some simple changes and make it easier to support > new architecture, then we support this feature on ARM64 and RISCV. > > [1]https://lore.kernel.org/lkml/20211123214814.3756047-1-pasha.tatashin@soleen.com/ > > v3 -> v4: > 1. Adapt to next-20220414 > > v2 -> v3: > 1. Modify ptep_clear() in include/linux/pgtable.h, using IS_ENABLED > according to the suggestions of Pasha. > > v1 -> v2: > 1. Fix arm64's pte/pmd/pud_user_accessible_page() according to the > suggestions of Catalin. > 2. Also fix riscv's pte_pmd_pud_user_accessible_page(). > > Kefeng Wang (2): > mm: page_table_check: move pxx_user_accessible_page into x86 > arm64: mm: add support for page table check > > Tong Tiangen (2): > mm: page_table_check: add hooks to public helpers > riscv: mm: add support for page table check > > arch/arm64/Kconfig | 1 + > arch/arm64/include/asm/pgtable.h | 65 ++++++++++++++++++++++++--- > arch/riscv/Kconfig | 1 + > arch/riscv/include/asm/pgtable.h | 77 +++++++++++++++++++++++++++++--- > arch/x86/include/asm/pgtable.h | 29 +++++++----- > include/linux/pgtable.h | 26 +++++++---- > mm/page_table_check.c | 25 ++++------- > 7 files changed, 178 insertions(+), 46 deletions(-) >