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=-6.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS 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 EAD3CC2B9F4 for ; Tue, 15 Jun 2021 00:14:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BF77F611CE for ; Tue, 15 Jun 2021 00:14:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229870AbhFOAQL (ORCPT ); Mon, 14 Jun 2021 20:16:11 -0400 Received: from mail.kernel.org ([198.145.29.99]:40398 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229536AbhFOAQI (ORCPT ); Mon, 14 Jun 2021 20:16:08 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0CFB3611CE; Tue, 15 Jun 2021 00:13:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1623716032; bh=se15b76/aO5F2KF29EEk9PwTwphIiHEyGbjleL82ixY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=tmS0lMh/VywKn2t8cjW762qsXrHuoTR/DXI+eYIY2xEWlKn+4r8XTI1T7FfSNbq7b s20wu3oBOjhC5s/81saZyD8vF2BkQw1E/oEK7AtKSq9vpMRcUxmGpBA+GghcD3azo5 TOiEqP0rjplZ3Q2VUu8UmANEdKmZsenGTnNnZQoE= Date: Mon, 14 Jun 2021 17:13:51 -0700 From: Andrew Morton To: Mike Rapoport Cc: Anshuman Khandual , Catalin Marinas , Qian Cai , David Hildenbrand , Ard Biesheuvel , Linux Memory Management List , Will Deacon , Marc Zyngier , Linux Kernel Mailing List , Linux ARM Subject: Re: Arm64 crash while reading memory sysfs Message-Id: <20210614171351.8c778c335896285020846666@linux-foundation.org> In-Reply-To: References: <20210527175047.GK8661@arm.com> <20210527155644.7792b4eaa16ec56645e1080c@linux-foundation.org> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 14 Jun 2021 11:25:54 +0300 Mike Rapoport wrote: > On Tue, Jun 08, 2021 at 12:36:21PM +0530, Anshuman Khandual wrote: > > > > > > 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 ? > > Andrew, > > Can you please pick the two patches above? I already had include-linux-mmzoneh-add-documentation-for-pfn_valid.patch memblock-update-initialization-of-reserved-pages.patch arm64-decouple-check-whether-pfn-is-in-linear-map-from-pfn_valid.patch arm64-drop-pfn_valid_within-and-simplify-pfn_valid.patch and I just added arm64-mm-drop-have_arch_pfn_valid.patch so I think we're all good now? and I don't think any of this is needed in 5.13 or -stable, correct? I still have question marks over https://lkml.kernel.org/r/YJ0Fhs5krPJ0FgiV@kernel.org and https://lkml.kernel.org/r/d55f915c-ad01-e729-1e29-b57d78257cbb@quicinc.com Is this all OK now?