Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp953145pxb; Fri, 22 Apr 2022 15:11:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzdCO+sp8UbfLg+yLSx2xN2vV7HDrrqhHCD19ZgG5VjXgh7EtWkni//ezNI4LLkJzJHHlHq X-Received: by 2002:a63:2cc6:0:b0:3aa:c4e5:246e with SMTP id s189-20020a632cc6000000b003aac4e5246emr4426695pgs.548.1650665516052; Fri, 22 Apr 2022 15:11:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650665516; cv=none; d=google.com; s=arc-20160816; b=LkqZBg1eBHYN8Zwe8EZm9DCXGteYFmAFKUfPjBztfRDc+zAHTd0WLVhtTOHy5mpWAf i47i89q5wRjix9hC0HzyyD4yyTbUaRGmJb+vrVM4qSUTB1Jrw6Eza0v6qcEOPegEqD00 f08LVt5L7y7LKA4Xf9SaVxA4z44T5rUu1gJwQueC3a9ASkeBRabDIemo6RDGOsuvRLc2 UkdT60yxYVpYyPUeVO1Aq0MO2qYm/wUgckvuBA0fZCyFCG/YqpiIVvbt5MvpJW5971HF EFuC9pbulA/ASPcNHwcC14Ij+glEtTqMbQMBFLFmD0xI8LSi6ahYyvDupQbctheDox87 UitQ== 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=LeorieBOmnAOMnPP/P1G2w3eTtqdyOrrORRYUNCaPZM=; b=SHaLDo/QQUksl09+wUC/U8cc8EQsLGaRDxfbvieuH9KDEqyhQbJmZv5qaN7jMSLx+P woAAA0u2pzXKBv/ISlm8veOSs5AggId5jmrtRzIoNe6dKNnUosdTBGJ9BLQVusYsIwxn IyT67PAeeOpAOC/MHeOmQGgZIBE5JRkdZoYN0udRLu1//Zg6tLFYZqh9rxhYP8VAev88 DGBK8sznezPt4rn5O9XNkS9WdrS1xIv8JycYBHRy95sAqDE5MsaGVR0QKETwiQclBmUX 1K2MiYDkI1fl8WSmXwB7gtX+yPSdz/k1U2hQpjz3aZLNJMMtqTXsweGJVRLGURTz1aHI lCZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b="xRbqkjM/"; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id n14-20020a170902d2ce00b0015c75cb2ac4si2375495plc.451.2022.04.22.15.11.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 15:11:56 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b="xRbqkjM/"; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 681D239D264; Fri, 22 Apr 2022 13:17:47 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1382814AbiDTWak (ORCPT + 99 others); Wed, 20 Apr 2022 18:30:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234341AbiDTWaj (ORCPT ); Wed, 20 Apr 2022 18:30:39 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5BF7B419BD; Wed, 20 Apr 2022 15:27:52 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id EB80C61A2A; Wed, 20 Apr 2022 22:27:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1F4FDC385A1; Wed, 20 Apr 2022 22:27:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1650493671; bh=f03i65TjXt1wV5OHqyMzJA28lOrn/DtPA2CRRbwKgHM=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=xRbqkjM/Ie8wCDh8lFTNir4DAVmdMcY9LuvmcZeYIeVsAxk69Iwg886RahAwszQNg wVjc8SbPk43znMip1B4TlXacUysfNXzwaIkbHXzV6admkQsk7YhOnTHETUxb0zsuBC YrKCJS/XJxlq2z5hFQlM4v0qkitAQ4WYCT5uOG5E= Date: Wed, 20 Apr 2022 15:27:49 -0700 From: Andrew Morton To: Ard Biesheuvel Cc: Anshuman Khandual , Wupeng Ma , Catalin Marinas , Will Deacon , Jonathan Corbet , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , X86 ML , hpa@zyccr.com, Darren Hart , Andy Shevchenko , Mike Rapoport , "Paul E. McKenney" , Peter Zijlstra , Joerg Roedel , songmuchun@bytedance.com, macro@orcam.me.uk, Frederic Weisbecker , W_Armin@gmx.de, John Garry , Sean Christopherson , Thomas Bogendoerfer , chenhuacai@kernel.org, David Hildenbrand , gpiccoli@igalia.com, Mark Rutland , Kefeng Wang , Linux Doc Mailing List , Linux Kernel Mailing List , Linux ARM , linux-efi , linux-ia64@vger.kernel.org, platform-driver-x86@vger.kernel.org, Linux Memory Management List Subject: Re: [PATCH v2 7/9] mm: Calc the right pfn if page size is not 4K Message-Id: <20220420152749.d41097e7d53ccd6a2a2aea5f@linux-foundation.org> In-Reply-To: References: <20220414101314.1250667-1-mawupeng1@huawei.com> <20220414101314.1250667-8-mawupeng1@huawei.com> <672ff459-81bd-38ef-882d-e718992d295c@arm.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 19 Apr 2022 20:29:27 +0200 Ard Biesheuvel wrote: > > > --- a/mm/page_alloc.c > > > +++ b/mm/page_alloc.c > > > @@ -7870,7 +7870,7 @@ static void __init find_zone_movable_pfns_for_nodes(void) > > > > > > usable_startpfn = memblock_region_memory_base_pfn(r); > > > > > > - if (usable_startpfn < 0x100000) { > > > + if (usable_startpfn < PHYS_PFN(SZ_4G)) { > > > mem_below_4gb_not_mirrored = true; > > > continue; > > > } > > > > Regardless PFN value should never be encoded directly. > > > > Reviewed-by: Anshuman Khandual > > Acked-by: Ard Biesheuvel > > Andrew, can you please take this one through the -mm tree? The rest of > the series needs a bit more work, but is an obvious fix and there is > no point in holding it up. Sure. I'm not seeing any description of the runtime effects of this shortcoming. I tentatively queued the fix for 5.18, without a cc:stable for backporting. But that might not be the best decision?