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=-7.1 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 71E87C352A3 for ; Mon, 10 Feb 2020 11:07:26 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id E486920838 for ; Mon, 10 Feb 2020 11:07:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b="qrkbsPru" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E486920838 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=armlinux.org.uk Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 4F7546B00E6; Mon, 10 Feb 2020 06:07:25 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 4CEF26B00E7; Mon, 10 Feb 2020 06:07:25 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3E3C96B00E8; Mon, 10 Feb 2020 06:07:25 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0176.hostedemail.com [216.40.44.176]) by kanga.kvack.org (Postfix) with ESMTP id 267E96B00E6 for ; Mon, 10 Feb 2020 06:07:25 -0500 (EST) Received: from smtpin25.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id AAC5B181AEF00 for ; Mon, 10 Feb 2020 11:07:24 +0000 (UTC) X-FDA: 76473941208.25.yard81_7ab85d1033131 X-HE-Tag: yard81_7ab85d1033131 X-Filterd-Recvd-Size: 11091 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [78.32.30.218]) by imf32.hostedemail.com (Postfix) with ESMTP for ; Mon, 10 Feb 2020 11:07:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To: Content-Transfer-Encoding:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=iTw2i6MUZITUD5eWPb+PW1VnYag/93bvIyoh66pK7Nw=; b=qrkbsPru1lr3ira5I9xWBowT9 pYyZLn+zGIyBwT0E94NzTtGTmKxIJthJ13h6C97vIAIg0RliWwgKf+WmKWXxBlrndc+VYR8DqF0u8 kLn5LP8E9C0yosgq5Zwl69HxjzG0vd3eUX37M0JzcOlOw0ylRSXG7MJNBvaf5Zjhmm+iVAuZZpi4P wkVwMkOhw7imN7PjDlbW9t8EGGVTegaRakCCh7775d7zk985OYH3cWbveigOQwvuzN1SoPIwwjGPF aJUGhEExIsLTHen8dY9vGmFUFIx9Q9xQJkrjq7idtYLtOfV3IdkZgc1cyFRmbJDqlBuxPFHLpFbxt Ho5+QgUHg==; Received: from shell.armlinux.org.uk ([2001:4d48:ad52:3201:5054:ff:fe00:4ec]:38428) by pandora.armlinux.org.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1j16u1-0006Ks-96; Mon, 10 Feb 2020 11:06:57 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.92) (envelope-from ) id 1j16tj-0007pZ-6Y; Mon, 10 Feb 2020 11:06:39 +0000 Date: Mon, 10 Feb 2020 11:06:39 +0000 From: Russell King - ARM Linux admin To: Christophe Leroy Cc: Anshuman Khandual , Andrew Morton , kbuild test robot , kbuild-all@lists.01.org, linux-mm@kvack.org, Vlastimil Babka , Greg Kroah-Hartman , Thomas Gleixner , Mike Rapoport , Jason Gunthorpe , Dan Williams , Peter Zijlstra , Michal Hocko , Mark Rutland , Mark Brown , Steven Price , Ard Biesheuvel , Masahiro Yamada , Kees Cook , Tetsuo Handa , Matthew Wilcox , Dave Hansen , Michael Ellerman , Paul Mackerras , Martin Schwidefsky , Heiko Carstens , "David S. Miller" , Vineet Gupta , James Hogan , Paul Burton , Ralf Baechle , "Kirill A . Shutemov" , Gerald Schaefer , Ingo Molnar , Richard Henderson , Ivan Kokshaysky , Matt Turner , Mark Salter , Aurelien Jacquiot , Yoshinori Sato , Brian Cain , Geert Uytterhoeven , Michal Simek , Paul Walmsley , Palmer Dabbelt , Guan Xuetao , Chris Zankel , Max Filippov , Qian Cai , linux-alpha@vger.kernel.org, linux-c6x-dev@linux-c6x.org, uclinux-h8-devel@lists.sourceforge.jp, linux-hexagon@vger.kernel.org, linux-m68k@vger.kernel.org, linux-riscv@lists.infradead.org, linux-xtensa@linux-xtensa.org, linux-snps-arc@lists.infradead.org, linux-mips@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-ia64@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH V13] mm/debug: Add tests validating architecture page table helpers Message-ID: <20200210110639.GC25745@shell.armlinux.org.uk> References: <1580897674-16456-1-git-send-email-anshuman.khandual@arm.com> <202002060619.wEOdAZU1%lkp@intel.com> <78d3ce6b-e100-2561-6b09-124c29731d1a@arm.com> <20200209205231.44d098f8749e88190b8ba10c@linux-foundation.org> <955229f7-f161-f720-0e75-a3163f63817d@arm.com> <20200210100200.GB25745@shell.armlinux.org.uk> <7cb3a5bb-eaea-a01c-4047-e3c000b7ad1d@c-s.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <7cb3a5bb-eaea-a01c-4047-e3c000b7ad1d@c-s.fr> User-Agent: Mutt/1.10.1 (2018-07-13) 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 Mon, Feb 10, 2020 at 11:46:23AM +0100, Christophe Leroy wrote: >=20 >=20 > Le 10/02/2020 =E0 11:02, Russell King - ARM Linux admin a =E9crit=A0: > > On Mon, Feb 10, 2020 at 07:38:38AM +0100, Christophe Leroy wrote: > > >=20 > > >=20 > > > Le 10/02/2020 =E0 06:35, Anshuman Khandual a =E9crit=A0: > > > >=20 > > > >=20 > > > > On 02/10/2020 10:22 AM, Andrew Morton wrote: > > > > > On Thu, 6 Feb 2020 13:49:35 +0530 Anshuman Khandual wrote: > > > > >=20 > > > > > >=20 > > > > > > On 02/06/2020 04:40 AM, kbuild test robot wrote: > > > > > > > Hi Anshuman, > > > > > > >=20 > > > > > > > Thank you for the patch! Yet something to improve: > > > > > > >=20 > > > > > > > [auto build test ERROR on powerpc/next] > > > > > > > [also build test ERROR on s390/features linus/master arc/fo= r-next v5.5] > > > > > > > [cannot apply to mmotm/master tip/x86/core arm64/for-next/c= ore next-20200205] > > > > > > > [if your patch is applied to the wrong git tree, please dro= p us a note to help > > > > > > > improve the system. BTW, we also suggest to use '--base' op= tion to specify the > > > > > > > base tree in git format-patch, please see https://stackover= flow.com/a/37406982] > > > > > > >=20 > > > > > > > url: https://github.com/0day-ci/linux/commits/Anshuman-K= handual/mm-debug-Add-tests-validating-architecture-page-table-helpers/202= 00205-215507 > > > > > > > base: https://git.kernel.org/pub/scm/linux/kernel/git/pow= erpc/linux.git next > > > > > > > config: ia64-allmodconfig (attached as .config) > > > > > > > compiler: ia64-linux-gcc (GCC) 7.5.0 > > > > > > > reproduce: > > > > > > > wget https://raw.githubusercontent.com/intel/lkp-= tests/master/sbin/make.cross -O ~/bin/make.cross > > > > > > > chmod +x ~/bin/make.cross > > > > > > > # save the attached .config to linux build tree > > > > > > > GCC_VERSION=3D7.5.0 make.cross ARCH=3Dia64 > > > > > > >=20 > > > > > > > If you fix the issue, kindly add following tag > > > > > > > Reported-by: kbuild test robot > > > > > > >=20 > > > > > > > All error/warnings (new ones prefixed by >>): > > > > > > >=20 > > > > > > > In file included from include/asm-generic/pgtable-nopu= d.h:8:0, > > > > > > > from arch/ia64/include/asm/pgtable.h:= 586, > > > > > > > from include/linux/mm.h:99, > > > > > > > from include/linux/highmem.h:8, > > > > > > > from mm/debug_vm_pgtable.c:14: > > > > > > > mm/debug_vm_pgtable.c: In function 'pud_clear_tests': > > > > > > > > > include/asm-generic/pgtable-nop4d-hack.h:47:32: error: = implicit declaration of function '__pgd'; did you mean '__p4d'? [-Werror=3D= implicit-function-declaration] > > > > > > > #define __pud(x) ((pud_t) { __pgd(x) }) > > > > > > > ^ > > > > > > > > > mm/debug_vm_pgtable.c:141:8: note: in expansion of macr= o '__pud' > > > > > > > pud =3D __pud(pud_val(pud) | RANDOM_ORVALUE); > > > > > > > ^~~~~ > > > > > > > > > include/asm-generic/pgtable-nop4d-hack.h:47:22: warning= : missing braces around initializer [-Wmissing-braces] > > > > > > > #define __pud(x) ((pud_t) { __pgd(x) }) > > > > > > > ^ > > > > > > > > > mm/debug_vm_pgtable.c:141:8: note: in expansion of macr= o '__pud' > > > > > > > pud =3D __pud(pud_val(pud) | RANDOM_ORVALUE); > > > > > > > ^~~~~ > > > > > > > cc1: some warnings being treated as errors > > > > > >=20 > > > > > > This build failure is expected now given that we have allowed= DEBUG_VM_PGTABLE > > > > > > with EXPERT without platform requiring ARCH_HAS_DEBUG_VM_PGTA= BLE. This problem > > > > > > i.e build failure caused without a platform __pgd(), is known= to exist both on > > > > > > ia64 and arm (32bit) platforms. Please refer https://lkml.org= /lkml/2019/9/24/314 > > > > > > for details where this was discussed earlier. > > > > > >=20 > > > > >=20 > > > > > I'd prefer not to merge a patch which is known to cause build > > > > > regressions. Is there some temporary thing we can do to preven= t these > > > > > errors until arch maintainers(?) get around to implementing the > > > > > long-term fixes? > > > >=20 > > > > We could explicitly disable CONFIG_DEBUG_VM_PGTABLE on ia64 and a= rm platforms > > > > which will ensure that others can still use the EXPERT path. > > > >=20 > > > > config DEBUG_VM_PGTABLE > > > > bool "Debug arch page table for semantics compliance" > > > > depends on MMU > > > > depends on !(IA64 || ARM) > > > > depends on ARCH_HAS_DEBUG_VM_PGTABLE || EXPERT > > > > default n if !ARCH_HAS_DEBUG_VM_PGTABLE > > > > default y if DEBUG_VM > > > >=20 > > >=20 > > > On both ia32 and arm, the fix is trivial. > > >=20 > > > Can we include the fix within this patch, just the same way as the > > > mm_p4d_folded() fix for x86 ? > >=20 > > Why should arm include a macro for something that nothing (apart from > > this checker) requires? If the checker requires it but the rest of > > the kernel does not, it suggests that the checker isn't actually > > correct, and the results can't be relied upon. > >=20 >=20 > As far as I can see, the problem is that arm opencodes part of the API > instead of including asm-generic/pgtable-nopmd.h >=20 > Here, the ARM has 2 levels, ie only PGD and PTE. But instead of definin= g > __pgd and __pte and getting everything else from asm-generic, it define= s a > __pmd then redefines the folded levels like the pud, etc ... >=20 > That's exactly what the checker aims at detecting: architectures than d= o not > properly use the standard linux page table structures. There are good reasons for the way ARM does stuff. The generic crap was written without regard for the circumstances that ARM has, and thus is entirely unsuitable for 32-bit ARM. --=20 RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbp= s up According to speedtest.net: 11.9Mbps down 500kbps up