Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3194955pxj; Mon, 14 Jun 2021 17:16:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwdC+RlK7dYDd6mjBmXbJV86jE+8yFc736CBVlMkvqYRDRnb581krjqx+/q1GpxMOyDYerW X-Received: by 2002:a17:907:9617:: with SMTP id gb23mr17709926ejc.483.1623716187694; Mon, 14 Jun 2021 17:16:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623716187; cv=none; d=google.com; s=arc-20160816; b=n+RptvvjESFviXSpSMAUEC0CUWbTci35eTIbai73hcHNCakgJDckO2dwge9Itms4xd 33IOr3NvJBVBuNEeLXlHK+RP3y7IyTW6JNU1DZ4VyjCbvzGlBTfhBCYmkeEmkzbhZCgg HRcpd/a243bHGxAKQs2TDzoK6ABmyZ3jbO6YHkp8hOmiCpmA0Tg2sFMfDuq6zSz/yMti aad/XhzJiHXaPieqxIcDAkPC6hqibzJoVsPF2lGgKA7BIQjah+i/HiqV4DwP8BDCcgVL EiulhXj226JB6/vvLEoaJKyx7CoIgzCNO72gacCGKH1Qjdh9awk8Q6MkbfXj8owJ/M0z 5PsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=ydecvfesECmvOwdGQjkyLaCYKA8+7R6/8/Xn+m3Lg7c=; b=pQbF9py6AtOWPU55QdX9/RUMTnYdt09/wblzHr3HEF8jfan9aWHBiCbIhCafFt9WXE Vv762O109Unx6W9crgJ3QqNfzy0ZQA420ILULbdI2cYErijbCQER3sSh3e1tBvToKPdb 7mNGxNcs34rcabzRcWuPcdM9nWq+KBxKUYZaT66nr/c77fy2MwKxZdEPsz5Qjo2bFoZi mREiVL4YHWcDKmxqeY7Ll8no8dM6Z+cYWP5iq5IkP3S0yQ7c0SQCGDxX3731Klt8UZ9N /HkheTXhvtw5A9h9K5GSY0BGrSdBPOdytrLnSElq9sD7Ga2u8s7Ut0ci/VKeWZczx1oW HMUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b="tmS0lMh/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 3si6541377ejm.82.2021.06.14.17.16.03; Mon, 14 Jun 2021 17:16:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b="tmS0lMh/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229728AbhFOAQL (ORCPT + 99 others); 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?