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=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 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 66C56C47082 for ; Tue, 8 Jun 2021 07:05:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 484036124B for ; Tue, 8 Jun 2021 07:05:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230119AbhFHHHc (ORCPT ); Tue, 8 Jun 2021 03:07:32 -0400 Received: from foss.arm.com ([217.140.110.172]:50704 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229678AbhFHHHb (ORCPT ); Tue, 8 Jun 2021 03:07:31 -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 9DE33ED1; Tue, 8 Jun 2021 00:05:38 -0700 (PDT) Received: from [10.163.83.140] (unknown [10.163.83.140]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 9BF443F73D; Tue, 8 Jun 2021 00:05:35 -0700 (PDT) Subject: Re: Arm64 crash while reading memory sysfs To: Mike Rapoport , Andrew Morton Cc: Catalin Marinas , Qian Cai , David Hildenbrand , Ard Biesheuvel , Linux Memory Management List , Will Deacon , Marc Zyngier , Linux Kernel Mailing List , Linux ARM References: <20210527175047.GK8661@arm.com> <20210527155644.7792b4eaa16ec56645e1080c@linux-foundation.org> From: Anshuman Khandual Message-ID: Date: Tue, 8 Jun 2021 12:36:21 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/28/21 10:43 AM, Mike Rapoport wrote: > On Thu, May 27, 2021 at 03:56:44PM -0700, Andrew Morton wrote: >> On Thu, 27 May 2021 18:50:48 +0100 Catalin Marinas wrote: >> >>>> Can you please try Anshuman's patch "arm64/mm: Drop HAVE_ARCH_PFN_VALID": >>>> >>>> https://lore.kernel.org/lkml/1621947349-25421-1-git-send-email-anshuman.khandual@arm.com >>>> >>>> It seems to me that the check for memblock_is_memory() in >>>> arm64::pfn_valid() is what makes init_unavailable_range() to bail out for >>>> section parts that are not actually populated and then we have >>>> VM_BUG_ON_PAGE(PagePoisoned(p)) for these pages. >>> >>> I acked Anshuman's patch, I think they all need to go in together. >> >> That's neat. Specifically which patches are we referring to here? > > arm64: drop pfn_valid_within() and simplify pfn_valid(): > https://lore.kernel.org/lkml/20210511100550.28178-5-rppt@kernel.org > > arm64/mm: Drop HAVE_ARCH_PFN_VALID: > https://lore.kernel.org/lkml/1621947349-25421-1-git-send-email-anshuman.khandual@arm.com I dont see the above patch (which drops HAVE_ARCH_PFN_VALID on arm64) on linux-next i.e. next-20210607. I might have missed some earlier context here but do not we want to fallback on generic pfn_valid() after Mike's series ?