Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp612916pxv; Thu, 15 Jul 2021 11:31:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzEH3hHvjn59SDB16/6JtVcQsolDcwvwJfv6GOGMfgIvEwhKUvyp3Hn9EH3cUQabWWyPuiK X-Received: by 2002:a05:6602:1c4:: with SMTP id w4mr4084949iot.44.1626373899257; Thu, 15 Jul 2021 11:31:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626373899; cv=none; d=google.com; s=arc-20160816; b=spDTWk7jbAVDZDcw8LUXP+k9J8w2Zok+4NKPz+O5Rn5Zr1vHbJMWCQOmUSt3slQJf0 CQ3J0zilksYvuubuuTauykwLEXkdpH1mtNwCgIf1Bipe5IrjiTSePyU9epv4aoFiVdCp Y/b/dBNgLmFiX3rI9yIzpXQxec06+TTzlhs6wIU8/ziAxjJeO4g/ZxtGlyGTKK9eFMnj +E1CXbjL6jQM5LWio2tA1jItiVzBes7uz+/BttKAkVnMWuJjUBbow5pV8jatcYjfNtg/ 3V4/MgIvmRq18e9BnUcr5ujvCXi+ZtU1+Kco5G4jnjBo4Jz+UALrMYmPmNX28S7+zrOg XPwg== 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=EoQqeLRd+nJi0TBT5QPEvGsRVQxR/XVpPOyNENJYOQw=; b=SuPRceEUNhlFK2QHdSLf8nGgK88SAtc9HK/rW8NHrCL6sX5v/oYpNyGQWVpgGPzA7I 9tqjOa185kQsxC8KSzMivg3qR28FdpJrJkMncWtjlNpuzNcHzKFks+GQqLe8eIQgDNfN diGrpnlLPm1PNFaIqMGgXUzfB6adw+cjQBAqikeRj8ur5FMjX+JL1Yh0p5Kjc+iyIkTq CmjKrrE+h8FyYsb6raN9SBYASO1doOlUMhcALbwRQMB4H9C+w63C/RysC3wnux+C/7CC 4C4oRjQY5d61Oop7d4cXtNkJ/GdK0lSL6HAGBwmDRbCzLOLZ3ZZwBHvvCLvfCI0E95Uz HQqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=FsZnz9nP; 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 v17si7667849ilo.17.2021.07.15.11.31.26; Thu, 15 Jul 2021 11:31:39 -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=FsZnz9nP; 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 S237705AbhGOSPf (ORCPT + 99 others); Thu, 15 Jul 2021 14:15:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:38376 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237690AbhGOSPe (ORCPT ); Thu, 15 Jul 2021 14:15:34 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C1AF761289; Thu, 15 Jul 2021 18:12:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1626372760; bh=563x5jc9W0wYdsYhRrwdZ2cKbN/d2MVtmAqW50LZyZ0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=FsZnz9nP1bhbXjnQ1v7vfL8Px6/NRc9/Tw/5rjvcQ0W74+LUQmJOvDrhD7sN0bzCQ A/377ILCL8HxH19Q2Bq7wRbdh8O+CrDgK5A9RTOxBhwtSw48htNA/wZQtNIKA/f8jC 7An5l1t6/H9nn+OV8w1rtEldUw2KaUAy48s9tI5o= Date: Thu, 15 Jul 2021 11:12:38 -0700 From: Andrew Morton To: David Hildenbrand Cc: Heiko Carstens , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Vitaly Kuznetsov , "Michael S. Tsirkin" , Jason Wang , Pankaj Gupta , Wei Yang , Oscar Salvador , Michal Hocko , Dan Williams , Anshuman Khandual , Dave Hansen , Vlastimil Babka , Mike Rapoport , "Rafael J. Wysocki" , Len Brown , Pavel Tatashin , Michael Ellerman , Catalin Marinas , virtualization@lists.linux-foundation.org, linux-acpi@vger.kernel.org, Andy Lutomirski , "Aneesh Kumar K.V" , Anton Blanchard , Ard Biesheuvel , Baoquan He , Benjamin Herrenschmidt , Borislav Petkov , Christian Borntraeger , Christophe Leroy , Dave Jiang , "H. Peter Anvin" , Ingo Molnar , Jia He , Joe Perches , Kefeng Wang , Laurent Dufour , Michel Lespinasse , Nathan Lynch , Nicholas Piggin , Paul Mackerras , Peter Zijlstra , Pierre Morel , "Rafael J. Wysocki" , Rich Felker , Scott Cheloha , Sergei Trofimovich , Thiago Jung Bauermann , Thomas Gleixner , Vasily Gorbik , Vishal Verma , Will Deacon , Yoshinori Sato Subject: Re: [PATCH v1 1/4] mm/memory_hotplug: use "unsigned long" for PFN in zone_for_pfn_range() Message-Id: <20210715111238.a557aec31381646d5cd71ef2@linux-foundation.org> In-Reply-To: <99c59db8-4c3d-6bee-9acc-41a8f76899ef@redhat.com> References: <20210712124052.26491-1-david@redhat.com> <20210712124052.26491-2-david@redhat.com> <99c59db8-4c3d-6bee-9acc-41a8f76899ef@redhat.com> 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 Thu, 15 Jul 2021 11:42:21 +0200 David Hildenbrand wrote: > > I'd propose to add Cc: since I actually had > > the fun to try to debug something like this a couple of years ago: > > 6cdb18ad98a4 ("mm/vmstat: fix overflow in mod_zone_page_state()") > > > > Good point, and thinking again what can go wrong, I tend to agree. We > are trying to keep zones contiguous and it could happen that we end up > with something like ZONE_DMA here (via default_kernel_zone_for_pfn()) > and would consequently online something to ZONE_DMA that doesn't belong > there, resulting in crashes. > > @Andrew can you add Cc: and > > "As we will search for a fitting zone using the wrong pfn, we might end > up onlining memory to one of the special kernel zones, such as ZONE_DMA, > which can end badly as the onlined memory does not satisfy properties of > these zones." Yep, all done.