Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp967688ybx; Thu, 7 Nov 2019 05:23:49 -0800 (PST) X-Google-Smtp-Source: APXvYqzjSrQiowUfUeFIslpVdNcfhmaVj29V3evVBIUZuHBXa+kstutqx0AQRuJsK7y6edQGiOfl X-Received: by 2002:a17:906:3582:: with SMTP id o2mr2989173ejb.54.1573133029278; Thu, 07 Nov 2019 05:23:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573133029; cv=none; d=google.com; s=arc-20160816; b=NfF96N+msMZwmpNwR/16vcSRf1To9m1LbYdoZk9ejZUrNze5UQzwfon2kZ6e0SgrY3 HUGYjJLOlFWprrTIo5lg585sS0mXlejDVYauw9+5TjDHdgcihS7mFhAiaXbwVZHxxStB zpitZ+2XmL95I3vfDFBUP5K9wY1NR1voTKEDcCojyhPvACDpepwkI1MvfZj/cPr1zS2c zhwubx7g7KBcBueO4QFqR1ywqcSS1eRYx2ZttNWnzjR/Z5XQkC744Y6lerpcQbI6R2Id doAsN7nGwwF+YZKg78JiUFc487Ri9oODq1dn2k/rTpxMH5Y0CoEI2X7/XW5woknf9Bax zJFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=VWorfwAkx1CSaE0V5vqoOu7DDde6kyhPlZ/+kvBAAeY=; b=e3h5pfm7QajJZnytBK5TniQLPNr9Z5qolB53mjFSIcR7JtXcC0kIODFIDohVkz1s5X jyzY7HP99HjREZ2jFozcEITaEHAtb0V9P3ydIVFFcvPe3vtckV43b+DpjHYPg9G5VXd/ 1g6vytIR2Qe10T48CgbzaZWToOfKinlSN3K6UBeDlpNnD3wutt/W1TeUmN6X+OQgDg/W AKoJY3VIVLBn1+gB1dldQp7sGJQLl1IZE8s2hqTwAk8bZEt5xUUR7tdecGCa/owGDgCU IiIcCCNGbd11YG7FC03dmm0tkEjhuAJWIjslCwNaAsYDYN1jmOZXeqlspixxvbDdZr1U 4b1g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w8si1461847ejq.57.2019.11.07.05.23.25; Thu, 07 Nov 2019 05:23:49 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388571AbfKGNWU (ORCPT + 99 others); Thu, 7 Nov 2019 08:22:20 -0500 Received: from foss.arm.com ([217.140.110.172]:56012 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388368AbfKGNWT (ORCPT ); Thu, 7 Nov 2019 08:22:19 -0500 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: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 à 04:22, Anshuman Khandual a écrit : >>>> On 10/28/2019 10:59 AM, Anshuman Khandual wrote: >>>>> +    ----------------------- >>>>> +    |         arch |status| >>>>> +    ----------------------- >>>>> +    |       alpha: | TODO | >>>>> +    |         arc: | TODO | >>>>> +    |         arm: | TODO | >>>>> +    |       arm64: |  ok  | >>>>> +    |         c6x: | TODO | >>>>> +    |        csky: | TODO | >>>>> +    |       h8300: | TODO | >>>>> +    |     hexagon: | TODO | >>>>> +    |        ia64: | TODO | >>>>> +    |        m68k: | TODO | >>>>> +    |  microblaze: | TODO | >>>>> +    |        mips: | TODO | >>>>> +    |       nds32: | TODO | >>>>> +    |       nios2: | TODO | >>>>> +    |    openrisc: | TODO | >>>>> +    |      parisc: | TODO | >>>>> +    |     powerpc: | TODO | >>>>> +    |       ppc32: |  ok  | >>> >>> 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'. > > On pseries: > > 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-20191107-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 > GPR00: c0000000010434b4 c00000003a403c10 c000000001295000 05210001000000c0 > GPR04: 8000000000000105 0000000000400dc0 000000003eb00000 0000000000000001 > GPR08: 0000000000000000 ffffffffffffffff 0000000000000001 0000000000000100 > GPR12: 0000000000000000 c0000000018f0000 > NIP [c0000000010435a0] debug_vm_pgtable+0x43c/0x82c > LR [c0000000010434b4] debug_vm_pgtable+0x350/0x82c > Call Trace: > [c00000003a403c10] [c00000000104346c] debug_vm_pgtable+0x308/0x82c (unreliable) > [c00000003a403ce0] [c000000001004310] kernel_init_freeable+0x1d0/0x39c > [c00000003a403db0] [c000000000010da0] kernel_init+0x24/0x174 > [c00000003a403e20] [c00000000000bdc4] ret_from_kernel_thread+0x5c/0x78 > Instruction dump: > 7d075078 7ce74b78 7ce0f9ad 40c2fff0 38800000 7f83e378 4b02eee1 60000000 > 48000080 3920ffff 39400001 39000000 <7ea0f8a8> 7ea75039 40c2fff8 7ea74878 > > Looking at the asm I think it's stuck in hash__pte_update() waiting for > H_PAGE_BUSY to clear, but not sure why. > > That's just using qemu TCG, instructions here if anyone wants to test it > themselves :) > > https://github.com/linuxppc/wiki/wiki/Booting-with-Qemu > > > If I boot with -cpu power9 (using Radix MMU), I get a plain old BUG: > > debug_vm_pgtable: debug_vm_pgtable: Validating architecture page table helpers > ------------[ cut here ]------------ > kernel BUG at arch/powerpc/mm/pgtable.c:274! > Oops: Exception in kernel mode, sig: 5 [#1] > LE PAGE_SIZE=64K MMU=Radix SMP NR_CPUS=32 NUMA pSeries > Modules linked in: > CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.4.0-rc6-gcc-8.2.0-next-20191107-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 > GPR00: c00000000104358c c00000003a483c10 c000000001295000 0000000000000009 > GPR04: 0000000000000000 0000000000000005 0000000000000000 0000000000000009 > GPR08: 0000000000000001 000000000000000e 0000000000000001 c00000003a5f0000 > GPR12: 0000000000000000 c0000000018f0000 c000000000010d84 0000000000000000 > GPR16: 0000000000000000 0000000000000000 c00000003a5f0000 8000000000000105 > GPR20: c000000001003ab8 0000000000000015 0500613a00000080 0900603a00000080 > GPR24: 09202e3a00000080 c00000000133bd90 c00000000133bd98 c00000000133bda0 > GPR28: c00000003a5e0000 c00000003a600af8 c00000003a2e2d48 c00000003a6100a0 > NIP [c0000000000724e8] assert_pte_locked+0x88/0x190 > LR [c00000000104358c] debug_vm_pgtable+0x428/0x82c > Call Trace: > [c00000003a483c10] [c00000000104346c] debug_vm_pgtable+0x308/0x82c (unreliable) > [c00000003a483ce0] [c000000001004310] kernel_init_freeable+0x1d0/0x39c > [c00000003a483db0] [c000000000010da0] kernel_init+0x24/0x174 > [c00000003a483e20] [c00000000000bdc4] ret_from_kernel_thread+0x5c/0x78 > Instruction dump: > 7d251a14 39070010 7d463030 7d084a14 38c6ffff 7c884436 7cc607b4 7d083038 > 79081f24 7ccb402a 7cc80074 7908d182 <0b080000> 78cb0022 54c8c03e 7d473830 > ---[ end trace a694f1bc56529c0e ]--- Oops. Does not seem like a quick problem to fix :) Though assert_pte_locked() gets checked only when DEBUG_VM is enabled. Probably will have to keep this test disabled on powerpc for now. > > > cheers >