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=-2.1 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_2 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 6549CC4BA13 for ; Wed, 26 Feb 2020 15:52:04 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 14BA420838 for ; Wed, 26 Feb 2020 15:52:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=lca.pw header.i=@lca.pw header.b="PEkBC2gG" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 14BA420838 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lca.pw Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 8F1D96B0005; Wed, 26 Feb 2020 10:52:03 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 8A1C16B0006; Wed, 26 Feb 2020 10:52:03 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 790F16B0007; Wed, 26 Feb 2020 10:52:03 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0157.hostedemail.com [216.40.44.157]) by kanga.kvack.org (Postfix) with ESMTP id 62F8A6B0005 for ; Wed, 26 Feb 2020 10:52:03 -0500 (EST) Received: from smtpin25.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 4ADD3180AD807 for ; Wed, 26 Feb 2020 15:52:03 +0000 (UTC) X-FDA: 76532719326.25.tax60_2ef9e0b291c52 X-HE-Tag: tax60_2ef9e0b291c52 X-Filterd-Recvd-Size: 6849 Received: from mail-qk1-f193.google.com (mail-qk1-f193.google.com [209.85.222.193]) by imf40.hostedemail.com (Postfix) with ESMTP for ; Wed, 26 Feb 2020 15:52:02 +0000 (UTC) Received: by mail-qk1-f193.google.com with SMTP id o28so3046409qkj.9 for ; Wed, 26 Feb 2020 07:52:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lca.pw; s=google; h=message-id:subject:from:to:cc:date:in-reply-to:references :mime-version:content-transfer-encoding; bh=4GYwlf0Xa2QHt1cHVU8f4uTPVQEe66S6tW8iKIjB1EY=; b=PEkBC2gGo9Wp0CTNFzcX/uGLGqh45la2h+234pEbgb0JKCTWiVwR5CK2qWd8o7GV9+ vZ0V3mJmWDxwpkokIiWuE2AK5D0JvSuKri12uT1Y5ZmnM2+2x1lk6TfjQrITZNEH8kqT OpLenMqGsrmR+s2Jh+PZTctbpw7UkSpOJj3m46DAs7sTe9V+A8PrxIZxTU0Jx2ozkU+h l2FfR5Vf/ZZGO7KqofRi3aS6TzSV2SHQoTpS42nUl+B16nz+oN/qYJaqXNzKW0WQZswg b+O0gHwTc4Y9Ju+CjJy1uD3JRDYV9kySWYvBERLoM4RJvQwJnkBJANxBmrBhZlFtAjqz NmYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:mime-version:content-transfer-encoding; bh=4GYwlf0Xa2QHt1cHVU8f4uTPVQEe66S6tW8iKIjB1EY=; b=a4lIOcGddIr+pP6yhPwGGcJUn4vQS4LVQlY/B+6IJ0HeD+loz2JppvXmCjvLjVAfo1 ICFqGYAZdMAbR7n9HvE+t2VgVyJR2iY8w96sV4cHiigN28AW7t9mEjdiSDQ8BbYfrhyx ab5ebAzj6+WTs7cFGGubH8blMgwj1VjFYoqdVNY0C+vwkOhbz14wLGO62+wEPCPhyCJV upwfKoMChpIdw/I8XavUhjn63oc1evs0gV78t4txL9qgHgt6d4J80Ph+LKJdvux9Doyy ddeB+XL47GptvquIkQDRynto6UxrFLbg0tblgNZMBg4JYy7LeHuBPEQqCHyUV9IwIsas EkBA== X-Gm-Message-State: APjAAAVVTyKhlaIvUDYaRoNupcDPTWwXbAkvNCNQSmq8cwCZT9SoleIl vv/XsNTtsyyipuiN/DaJS1MifA== X-Google-Smtp-Source: APXvYqxycYwltSMF6mRZHm7TjXsCzQqI/GC2y1t3waZQf56agLdqkPAjaYu5yvSrjxUQYf0tQtgA0w== X-Received: by 2002:a37:64cb:: with SMTP id y194mr5808427qkb.364.1582732321799; Wed, 26 Feb 2020 07:52:01 -0800 (PST) Received: from dhcp-41-57.bos.redhat.com (nat-pool-bos-t.redhat.com. [66.187.233.206]) by smtp.gmail.com with ESMTPSA id 3sm1332599qte.59.2020.02.26.07.51.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 26 Feb 2020 07:52:01 -0800 (PST) Message-ID: <1582732318.7365.129.camel@lca.pw> Subject: Re: [PATCH V14] mm/debug: Add tests validating architecture page table helpers From: Qian Cai To: Christophe Leroy , Anshuman Khandual , linux-mm@kvack.org Cc: Andrew Morton , Mike Rapoport , Vineet Gupta , Catalin Marinas , Will Deacon , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Heiko Carstens , Vasily Gorbik , Christian Borntraeger , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , "Kirill A . Shutemov" , Paul Walmsley , Palmer Dabbelt , linux-snps-arc@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-riscv@lists.infradead.org, x86@kernel.org, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org Date: Wed, 26 Feb 2020 10:51:58 -0500 In-Reply-To: <7c707b7f-ce3d-993b-8042-44fdc1ed28bf@c-s.fr> References: <1581909460-19148-1-git-send-email-anshuman.khandual@arm.com> <1582726182.7365.123.camel@lca.pw> <7c707b7f-ce3d-993b-8042-44fdc1ed28bf@c-s.fr> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.22.6 (3.22.6-10.el7) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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: On Wed, 2020-02-26 at 15:45 +0100, Christophe Leroy wrote: >=20 > Le 26/02/2020 =C3=A0 15:09, Qian Cai a =C3=A9crit=C2=A0: > > On Mon, 2020-02-17 at 08:47 +0530, Anshuman Khandual wrote: > > > This adds tests which will validate architecture page table helpers= and > > > other accessors in their compliance with expected generic MM semant= ics. > > > This will help various architectures in validating changes to exist= ing > > > page table helpers or addition of new ones. > > >=20 > > > This test covers basic page table entry transformations including b= ut not > > > limited to old, young, dirty, clean, write, write protect etc at va= rious > > > level along with populating intermediate entries with next page tab= le page > > > and validating them. > > >=20 > > > Test page table pages are allocated from system memory with require= d size > > > and alignments. The mapped pfns at page table levels are derived fr= om a > > > real pfn representing a valid kernel text symbol. This test gets ca= lled > > > inside kernel_init() right after async_synchronize_full(). > > >=20 > > > This test gets built and run when CONFIG_DEBUG_VM_PGTABLE is select= ed. Any > > > architecture, which is willing to subscribe this test will need to = select > > > ARCH_HAS_DEBUG_VM_PGTABLE. For now this is limited to arc, arm64, x= 86, s390 > > > and ppc32 platforms where the test is known to build and run succes= sfully. > > > Going forward, other architectures too can subscribe the test after= fixing > > > any build or runtime problems with their page table helpers. Meanwh= ile for > > > better platform coverage, the test can also be enabled with CONFIG_= EXPERT > > > even without ARCH_HAS_DEBUG_VM_PGTABLE. > > >=20 > > > Folks interested in making sure that a given platform's page table = helpers > > > conform to expected generic MM semantics should enable the above co= nfig > > > which will just trigger this test during boot. Any non conformity h= ere will > > > be reported as an warning which would need to be fixed. This test w= ill help > > > catch any changes to the agreed upon semantics expected from generi= c MM and > > > enable platforms to accommodate it thereafter. > >=20 > > How useful is this that straightly crash the powerpc? > >=20 > > [=C2=A0=C2=A0=C2=A023.263425][=C2=A0=C2=A0=C2=A0=C2=A0T1] debug_vm_pg= table: debug_vm_pgtable: Validating > > architecture page table helpers > > [=C2=A0=C2=A0=C2=A023.263625][=C2=A0=C2=A0=C2=A0=C2=A0T1] -----------= -[ cut here ]------------ > > [=C2=A0=C2=A0=C2=A023.263649][=C2=A0=C2=A0=C2=A0=C2=A0T1] kernel BUG = at arch/powerpc/mm/pgtable.c:274! >=20 > The problem on PPC64 is known and has to be investigated and fixed. It might be interesting to hear what powerpc64 maintainers would say abou= t it and if it is actually worth "fixing" in the arch code, but that BUG_ON() = was there since 2009 and had not been exposed until this patch comes alone?