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.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, 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 D5BCDFC6197 for ; Thu, 7 Nov 2019 13:22:21 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 9129D222CB for ; Thu, 7 Nov 2019 13:22:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9129D222CB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 0822C6B0003; Thu, 7 Nov 2019 08:22:21 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 00CD66B0006; Thu, 7 Nov 2019 08:22:20 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E16A06B0007; Thu, 7 Nov 2019 08:22:20 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0194.hostedemail.com [216.40.44.194]) by kanga.kvack.org (Postfix) with ESMTP id C87516B0003 for ; Thu, 7 Nov 2019 08:22:20 -0500 (EST) Received: from smtpin10.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with SMTP id 7D5C24DAE for ; Thu, 7 Nov 2019 13:22:20 +0000 (UTC) X-FDA: 76129545240.10.smoke87_88b431c3eb211 X-HE-Tag: smoke87_88b431c3eb211 X-Filterd-Recvd-Size: 8662 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf26.hostedemail.com (Postfix) with ESMTP for ; Thu, 7 Nov 2019 13:22:19 +0000 (UTC) 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 3172D31B; Thu, 7 Nov 2019 05:22:18 -0800 (PST) Received: from [10.163.1.22] (unknown [10.163.1.22]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7406D3F6C4; Thu, 7 Nov 2019 05:21:59 -0800 (PST) Subject: Re: [PATCH V8] mm/debug: Add tests validating architecture page table helpers To: Michael Ellerman , Christophe Leroy , linux-mm@kvack.org Cc: Andrew Morton , 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 , Sri Krishna chowdary , Dave Hansen , Russell King - ARM Linux , Paul Mackerras , Martin Schwidefsky , Heiko Carstens , "David S. Miller" , Vineet Gupta , James Hogan , Paul Burton , Ralf Baechle , "Kirill A . Shutemov" , Gerald Schaefer , Ingo Molnar , 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 References: <1572240562-23630-1-git-send-email-anshuman.khandual@arm.com> <3229d68d-0b9d-0719-3370-c6e1df0ea032@arm.com> <42160baa-0e9d-73d0-bf72-58bdbacf10ff@c-s.fr> <0e0c2ce9-636d-1153-2451-baf7317ed45f@arm.com> <87tv7f4zkf.fsf@mpe.ellerman.id.au> From: Anshuman Khandual Message-ID: <83f14c65-035c-8387-3216-5dee8a287cfb@arm.com> Date: Thu, 7 Nov 2019 18:52:34 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <87tv7f4zkf.fsf@mpe.ellerman.id.au> Content-Type: text/plain; charset=utf-8 Content-Language: en-US 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 11/07/2019 06:24 PM, Michael Ellerman wrote: > Anshuman Khandual writes: >> On 11/06/2019 12:11 PM, Christophe Leroy wrote: >>> Le 06/11/2019 =C3=A0 04:22, Anshuman Khandual a =C3=A9crit=C2=A0: >>>> On 10/28/2019 10:59 AM, Anshuman Khandual wrote: >>>>> +=C2=A0=C2=A0=C2=A0 ----------------------- >>>>> +=C2=A0=C2=A0=C2=A0 |=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= arch |status| >>>>> +=C2=A0=C2=A0=C2=A0 ----------------------- >>>>> +=C2=A0=C2=A0=C2=A0 |=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 alpha: | = TODO | >>>>> +=C2=A0=C2=A0=C2=A0 |=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= arc: | TODO | >>>>> +=C2=A0=C2=A0=C2=A0 |=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= arm: | TODO | >>>>> +=C2=A0=C2=A0=C2=A0 |=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 arm64: |=C2= =A0 ok=C2=A0 | >>>>> +=C2=A0=C2=A0=C2=A0 |=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= c6x: | TODO | >>>>> +=C2=A0=C2=A0=C2=A0 |=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 csk= y: | TODO | >>>>> +=C2=A0=C2=A0=C2=A0 |=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 h8300: | = TODO | >>>>> +=C2=A0=C2=A0=C2=A0 |=C2=A0=C2=A0=C2=A0=C2=A0 hexagon: | TODO | >>>>> +=C2=A0=C2=A0=C2=A0 |=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ia6= 4: | TODO | >>>>> +=C2=A0=C2=A0=C2=A0 |=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 m68= k: | TODO | >>>>> +=C2=A0=C2=A0=C2=A0 |=C2=A0 microblaze: | TODO | >>>>> +=C2=A0=C2=A0=C2=A0 |=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 mip= s: | TODO | >>>>> +=C2=A0=C2=A0=C2=A0 |=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 nds32: | = TODO | >>>>> +=C2=A0=C2=A0=C2=A0 |=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 nios2: | = TODO | >>>>> +=C2=A0=C2=A0=C2=A0 |=C2=A0=C2=A0=C2=A0 openrisc: | TODO | >>>>> +=C2=A0=C2=A0=C2=A0 |=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 parisc: | TODO = | >>>>> +=C2=A0=C2=A0=C2=A0 |=C2=A0=C2=A0=C2=A0=C2=A0 powerpc: | TODO | >>>>> +=C2=A0=C2=A0=C2=A0 |=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ppc32: |=C2= =A0 ok=C2=A0 | >>> >>> Note that ppc32 is a part of powerpc, not a standalone arch. >> >> Right, I understand. But we are yet to hear about how this test >> came about on powerpc server platforms. Will update 'powerpc' >> arch listing above once we get some confirmation. May be once >> this works on all relevant powerpc platforms, we can just merge >> 'powerpc' and 'ppc32' entries here as just 'powerpc'. >=20 > On pseries: >=20 > watchdog: BUG: soft lockup - CPU#0 stuck for 23s! [swapper/0:1] > Modules linked in: > CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.4.0-rc6-gcc-8.2.0-next-20= 191107-00001-g250339d6747b-dirty #152 > NIP: c0000000010435a0 LR: c0000000010434b4 CTR: 0000000000000000 > REGS: c00000003a403980 TRAP: 0901 Not tainted (5.4.0-rc6-gcc-8.2.0= -next-20191107-00001-g250339d6747b-dirty) > MSR: 8000000002009033 CR: 44000222 XER:= 00000000 > CFAR: c0000000010435a8 IRQMASK: 0=20 > GPR00: c0000000010434b4 c00000003a403c10 c000000001295000 05210001000= 000c0=20 > GPR04: 8000000000000105 0000000000400dc0 000000003eb00000 00000000000= 00001=20 > GPR08: 0000000000000000 ffffffffffffffff 0000000000000001 00000000000= 00100=20 > GPR12: 0000000000000000 c0000000018f0000=20 > NIP [c0000000010435a0] debug_vm_pgtable+0x43c/0x82c > LR [c0000000010434b4] debug_vm_pgtable+0x350/0x82c > Call Trace: > [c00000003a403c10] [c00000000104346c] debug_vm_pgtable+0x308/0x82c (u= nreliable) > [c00000003a403ce0] [c000000001004310] kernel_init_freeable+0x1d0/0x39= c > [c00000003a403db0] [c000000000010da0] kernel_init+0x24/0x174 > [c00000003a403e20] [c00000000000bdc4] ret_from_kernel_thread+0x5c/0x7= 8 > Instruction dump: > 7d075078 7ce74b78 7ce0f9ad 40c2fff0 38800000 7f83e378 4b02eee1 600000= 00=20 > 48000080 3920ffff 39400001 39000000 <7ea0f8a8> 7ea75039 40c2fff8 7ea7= 4878=20 >=20 > Looking at the asm I think it's stuck in hash__pte_update() waiting for > H_PAGE_BUSY to clear, but not sure why. >=20 > That's just using qemu TCG, instructions here if anyone wants to test i= t > themselves :) >=20 > https://github.com/linuxppc/wiki/wiki/Booting-with-Qemu >=20 >=20 > If I boot with -cpu power9 (using Radix MMU), I get a plain old BUG: >=20 > debug_vm_pgtable: debug_vm_pgtable: Validating architecture page tabl= e helpers > ------------[ cut here ]------------ > kernel BUG at arch/powerpc/mm/pgtable.c:274! > Oops: Exception in kernel mode, sig: 5 [#1] > LE PAGE_SIZE=3D64K MMU=3DRadix SMP NR_CPUS=3D32 NUMA pSeries > Modules linked in: > CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.4.0-rc6-gcc-8.2.0-next-20= 191107-00001-g250339d6747b-dirty #152 > NIP: c0000000000724e8 LR: c00000000104358c CTR: 0000000000000000 > REGS: c00000003a483980 TRAP: 0700 Not tainted (5.4.0-rc6-gcc-8.2.0= -next-20191107-00001-g250339d6747b-dirty) > MSR: 8000000002029033 CR: 24000224 XER:= 20000000 > CFAR: c000000001043588 IRQMASK: 0=20 > GPR00: c00000000104358c c00000003a483c10 c000000001295000 00000000000= 00009=20 > GPR04: 0000000000000000 0000000000000005 0000000000000000 00000000000= 00009=20 > GPR08: 0000000000000001 000000000000000e 0000000000000001 c00000003a5= f0000=20 > GPR12: 0000000000000000 c0000000018f0000 c000000000010d84 00000000000= 00000=20 > GPR16: 0000000000000000 0000000000000000 c00000003a5f0000 80000000000= 00105=20 > GPR20: c000000001003ab8 0000000000000015 0500613a00000080 0900603a000= 00080=20 > GPR24: 09202e3a00000080 c00000000133bd90 c00000000133bd98 c0000000013= 3bda0=20 > GPR28: c00000003a5e0000 c00000003a600af8 c00000003a2e2d48 c00000003a6= 100a0=20 > NIP [c0000000000724e8] assert_pte_locked+0x88/0x190 > LR [c00000000104358c] debug_vm_pgtable+0x428/0x82c > Call Trace: > [c00000003a483c10] [c00000000104346c] debug_vm_pgtable+0x308/0x82c (u= nreliable) > [c00000003a483ce0] [c000000001004310] kernel_init_freeable+0x1d0/0x39= c > [c00000003a483db0] [c000000000010da0] kernel_init+0x24/0x174 > [c00000003a483e20] [c00000000000bdc4] ret_from_kernel_thread+0x5c/0x7= 8 > Instruction dump: > 7d251a14 39070010 7d463030 7d084a14 38c6ffff 7c884436 7cc607b4 7d0830= 38=20 > 79081f24 7ccb402a 7cc80074 7908d182 <0b080000> 78cb0022 54c8c03e 7d47= 3830=20 > ---[ end trace a694f1bc56529c0e ]--- Oops. Does not seem like a quick problem to fix :) Though assert_pte_lock= ed() gets checked only when DEBUG_VM is enabled. Probably will have to keep th= is test disabled on powerpc for now. >=20 >=20 > cheers >=20