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 X-Spam-Level: X-Spam-Status: No, score=-12.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 607CBC4338F for ; Wed, 25 Aug 2021 09:20:04 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2C5F961073 for ; Wed, 25 Aug 2021 09:20:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 2C5F961073 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:CC :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=nglFTnZknB9r71xaWcQSLvunOsYQjvgKZZ2cACp264E=; b=NCd8JFICH1Ruo4 d3E/UhpUJBGcp5f17U0nzhywQ3TZ3f12CQtVwLIWP5Y+X/DPaU5gmsB3u9/5TnipOGhHVoHc+F+Wq sD41tKwe40N8tBTFjt/LAqH1/cGtmb4CzhSjNWqWmDXpuC2FcObG4DURh+aLkiNKdQ9EJlRm7b4XV we5pgul025xHZZ316myM4DWklpBWorj799jaM0XxSFr8tvobZWeAYcKLrRkQSRfDPfzUKuPHLt5lh PriMn7wn8mVqfdFQ7Ta1D2777OONJUAEdYAJtMKx1MdPrikrsZ8jvXfkHE2vXfEWlL2Q6O9UhurWP gzi/YEtFgXz3tLD4FCbA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mIp2W-0065o4-1d; Wed, 25 Aug 2021 09:17:44 +0000 Received: from szxga01-in.huawei.com ([45.249.212.187]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mIp2B-0065e0-T6 for linux-arm-kernel@lists.infradead.org; Wed, 25 Aug 2021 09:17:25 +0000 Received: from dggemv711-chm.china.huawei.com (unknown [172.30.72.55]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4GvgMz2S67zYrNx; Wed, 25 Aug 2021 17:16:47 +0800 (CST) Received: from dggpemm500001.china.huawei.com (7.185.36.107) by dggemv711-chm.china.huawei.com (10.1.198.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Wed, 25 Aug 2021 17:17:20 +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.2176.2; Wed, 25 Aug 2021 17:17:20 +0800 From: Kefeng Wang To: Russell King , Alexander Potapenko , Marco Elver , Dmitry Vyukov , , , CC: Andrew Morton , Kefeng Wang Subject: [PATCH 0/4] ARM: Support KFENCE feature Date: Wed, 25 Aug 2021 17:21:12 +0800 Message-ID: <20210825092116.149975-1-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggpemm500001.china.huawei.com (7.185.36.107) X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210825_021724_169097_59376430 X-CRM114-Status: GOOD ( 10.80 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The patch 1~3 is to support KFENCE feature on ARM. NOTE: The context of patch2/3 changes in arch/arm/mm/fault.c is based on link[1], which make some refactor and cleanup about page fault. kfence_test is not useful when kfence is not enabled, skip kfence test when kfence not enabled in patch4. I tested the kfence_test on ARM QEMU with or without ARM_LPAE and all passed. [1] https://lore.kernel.org/linux-arm-kernel/20210610123556.171328-1-wangkefeng.wang@huawei.com/ Kefeng Wang (4): ARM: mm: Provide set_memory_valid() ARM: mm: Provide is_write_fault() ARM: Support KFENCE for ARM mm: kfence: Only load kfence_test when kfence is enabled arch/arm/Kconfig | 1 + arch/arm/include/asm/kfence.h | 52 +++++++++++++++++++++++++++++++ arch/arm/include/asm/set_memory.h | 5 +++ arch/arm/mm/fault.c | 16 ++++++++-- arch/arm/mm/pageattr.c | 41 ++++++++++++++++++------ include/linux/kfence.h | 2 ++ mm/kfence/core.c | 8 +++++ mm/kfence/kfence_test.c | 2 ++ 8 files changed, 114 insertions(+), 13 deletions(-) create mode 100644 arch/arm/include/asm/kfence.h -- 2.26.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel