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=-3.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=no 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 75738C7618B for ; Thu, 25 Jul 2019 06:56:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 420B921871 for ; Thu, 25 Jul 2019 06:56:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729097AbfGYG4T (ORCPT ); Thu, 25 Jul 2019 02:56:19 -0400 Received: from foss.arm.com ([217.140.110.172]:52672 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725808AbfGYG4S (ORCPT ); Thu, 25 Jul 2019 02:56:18 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 1CCBE344; Wed, 24 Jul 2019 23:56:18 -0700 (PDT) Received: from p8cg001049571a15.blr.arm.com (p8cg001049571a15.blr.arm.com [10.162.42.109]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 4FEA03F71F; Wed, 24 Jul 2019 23:58:17 -0700 (PDT) From: Anshuman Khandual To: linux-mm@kvack.org Cc: Anshuman Khandual , Andrew Morton , Michal Hocko , Catalin Marinas , Mark Rutland , Mark Brown , Steven Price , Ard Biesheuvel , Masahiro Yamada , Kees Cook , Tetsuo Handa , Matthew Wilcox , Sri Krishna chowdary , Dave Hansen , linux-arm-kernel@lists.infradead.org, x86@kernel.org, linux-kernel@vger.kernel.org Subject: [RFC] mm/debug: Add tests for architecture exported page table helpers Date: Thu, 25 Jul 2019 12:25:22 +0530 Message-Id: <1564037723-26676-1-git-send-email-anshuman.khandual@arm.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This series adds a test validation for architecture exported page table helpers. Patch in the series add basic transformation tests at various level of the page table. This test was originally suggested by Catalin during arm64 THP migration RFC discussion earlier. Going forward it can include more specific tests with respect to various generic MM functions like THP, HugeTLB etc and platform specific tests. https://lore.kernel.org/linux-mm/20190628102003.GA56463@arrakis.emea.arm.com/ Issues: Does not build on arm64 as a module and fails with following errors. This is primarily caused by set_pgd() called from pgd_clear() and pgd_populate(). ERROR: "set_swapper_pgd" [lib/test_arch_pgtable.ko] undefined! ERROR: "swapper_pg_dir" [lib/test_arch_pgtable.ko] undefined! These symbols need to be visible for driver usage or will have to disable loadable module option for this test on arm64 platform. Testing: Build and boot tested on arm64 and x86 platforms. While arm64 clears all these tests, following errors were reported on x86. 1. WARN_ON(pud_bad(pud)) in pud_populate_tests() 2. WARN_ON(p4d_bad(p4d)) in p4d_populate_tests() I would really appreciate if folks can help validate this test in other platforms and report back problems if any. Suggestions, comments and inputs welcome. Thank you. Cc: Andrew Morton Cc: Michal Hocko Cc: Catalin Marinas Cc: Mark Rutland Cc: Mark Brown Cc: Steven Price Cc: Ard Biesheuvel Cc: Masahiro Yamada Cc: Kees Cook Cc: Tetsuo Handa Cc: Matthew Wilcox Cc: Sri Krishna chowdary Cc: Dave Hansen Cc: linux-arm-kernel@lists.infradead.org Cc: x86@kernel.org Cc: linux-kernel@vger.kernel.org Anshuman Khandual (1): mm/pgtable/debug: Add test validating architecture page table helpers lib/Kconfig.debug | 14 +++ lib/Makefile | 1 + lib/test_arch_pgtable.c | 290 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 305 insertions(+) create mode 100644 lib/test_arch_pgtable.c -- 2.7.4 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=-3.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=no 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 41C84C7618B for ; Thu, 25 Jul 2019 06:56:32 +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 14FB12070B for ; Thu, 25 Jul 2019 06:56:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Xvpra7xH" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 14FB12070B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject: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=SG+LjaDHuJJLDob3csCLhw9h51NTOnJ5BO4EmGRoEa4=; b=Xvp ra7xHjwTOi/pXxy0b+gR1UcBLu/AyOmfNy0HsqxkMCalqr4fPiEiQR78QyL0OrNRTVbrqB/YYWfiM OHV5rP5bCvbYz6bYh4A7Hk+kgSRJJzW584fcNf7784VGV10Kkwn30YW3DXVZYBOv1Izo29ez15z2u Z4zmLYkjIt62CEXJJT+RsOHR2Mw5QFCfTjBdAMQnKFWqmvZ9BkglHFauYF9nbtwcl6Ntn9Ka8cQnE RZC1sjkXd0fQ84rpl1mT0Csi8erN0DNmXk/NkILbE5xv3q+55rCQAFLjhuf0/qq/sjN2OMPzZIi8D 68J4QbmDfnwYEmplAXyHDMdzX3r8thQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hqXfs-0000bW-La; Thu, 25 Jul 2019 06:56:24 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hqXfo-0000aM-EK for linux-arm-kernel@lists.infradead.org; Thu, 25 Jul 2019 06:56:22 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 1CCBE344; Wed, 24 Jul 2019 23:56:18 -0700 (PDT) Received: from p8cg001049571a15.blr.arm.com (p8cg001049571a15.blr.arm.com [10.162.42.109]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 4FEA03F71F; Wed, 24 Jul 2019 23:58:17 -0700 (PDT) From: Anshuman Khandual To: linux-mm@kvack.org Subject: [RFC] mm/debug: Add tests for architecture exported page table helpers Date: Thu, 25 Jul 2019 12:25:22 +0530 Message-Id: <1564037723-26676-1-git-send-email-anshuman.khandual@arm.com> X-Mailer: git-send-email 2.7.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190724_235620_524398_8A04B545 X-CRM114-Status: GOOD ( 10.78 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , x86@kernel.org, Kees Cook , Sri Krishna chowdary , Anshuman Khandual , Tetsuo Handa , Catalin Marinas , Ard Biesheuvel , Dave Hansen , linux-kernel@vger.kernel.org, Matthew Wilcox , Michal Hocko , Masahiro Yamada , Mark Brown , Andrew Morton , Steven Price , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org This series adds a test validation for architecture exported page table helpers. Patch in the series add basic transformation tests at various level of the page table. This test was originally suggested by Catalin during arm64 THP migration RFC discussion earlier. Going forward it can include more specific tests with respect to various generic MM functions like THP, HugeTLB etc and platform specific tests. https://lore.kernel.org/linux-mm/20190628102003.GA56463@arrakis.emea.arm.com/ Issues: Does not build on arm64 as a module and fails with following errors. This is primarily caused by set_pgd() called from pgd_clear() and pgd_populate(). ERROR: "set_swapper_pgd" [lib/test_arch_pgtable.ko] undefined! ERROR: "swapper_pg_dir" [lib/test_arch_pgtable.ko] undefined! These symbols need to be visible for driver usage or will have to disable loadable module option for this test on arm64 platform. Testing: Build and boot tested on arm64 and x86 platforms. While arm64 clears all these tests, following errors were reported on x86. 1. WARN_ON(pud_bad(pud)) in pud_populate_tests() 2. WARN_ON(p4d_bad(p4d)) in p4d_populate_tests() I would really appreciate if folks can help validate this test in other platforms and report back problems if any. Suggestions, comments and inputs welcome. Thank you. Cc: Andrew Morton Cc: Michal Hocko Cc: Catalin Marinas Cc: Mark Rutland Cc: Mark Brown Cc: Steven Price Cc: Ard Biesheuvel Cc: Masahiro Yamada Cc: Kees Cook Cc: Tetsuo Handa Cc: Matthew Wilcox Cc: Sri Krishna chowdary Cc: Dave Hansen Cc: linux-arm-kernel@lists.infradead.org Cc: x86@kernel.org Cc: linux-kernel@vger.kernel.org Anshuman Khandual (1): mm/pgtable/debug: Add test validating architecture page table helpers lib/Kconfig.debug | 14 +++ lib/Makefile | 1 + lib/test_arch_pgtable.c | 290 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 305 insertions(+) create mode 100644 lib/test_arch_pgtable.c -- 2.7.4 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel