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.8 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 86E04C636C9 for ; Thu, 15 Jul 2021 18:12:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6770E613D0 for ; Thu, 15 Jul 2021 18:12:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237695AbhGOSPe (ORCPT ); Thu, 15 Jul 2021 14:15:34 -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-acpi@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. 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=-3.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,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 39891C636C9 for ; Thu, 15 Jul 2021 18:19:35 +0000 (UTC) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DD1F561178 for ; Thu, 15 Jul 2021 18:19:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DD1F561178 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=virtualization-bounces@lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id AC4D9404FA; Thu, 15 Jul 2021 18:19:34 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bltT4I-6RR0f; Thu, 15 Jul 2021 18:19:33 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp4.osuosl.org (Postfix) with ESMTPS id 064244026A; Thu, 15 Jul 2021 18:19:32 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id D0993C0010; Thu, 15 Jul 2021 18:19:32 +0000 (UTC) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists.linuxfoundation.org (Postfix) with ESMTP id 7E1FEC0010 for ; Thu, 15 Jul 2021 18:19:32 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id B169540274 for ; Thu, 15 Jul 2021 18:19:27 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id OGbA9JRX1lXl for ; Thu, 15 Jul 2021 18:19:25 +0000 (UTC) X-Greylist: delayed 00:06:44 by SQLgrey-1.8.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp4.osuosl.org (Postfix) with ESMTPS id B50984061D for ; Thu, 15 Jul 2021 18:19:25 +0000 (UTC) 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 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 Cc: Michel Lespinasse , Kefeng Wang , Rich Felker , Wei Yang , "Michael S. Tsirkin" , Peter Zijlstra , Catalin Marinas , Dave Hansen , Michal Hocko , linux-mm@kvack.org, Paul Mackerras , "H. Peter Anvin" , Will Deacon , Ard Biesheuvel , Laurent Dufour , Dave Jiang , Baoquan He , Christian Borntraeger , Michael Ellerman , "Rafael J. Wysocki" , linux-acpi@vger.kernel.org, Ingo Molnar , Benjamin Herrenschmidt , Anton Blanchard , Len Brown , Nathan Lynch , Pavel Tatashin , Vasily Gorbik , Anshuman Khandual , Heiko Carstens , Nicholas Piggin , Vishal Verma , Borislav Petkov , Sergei Trofimovich , Andy Lutomirski , Jia He , Dan Williams , virtualization@lists.linux-foundation.org, Vlastimil Babka , Oscar Salvador , Christophe Leroy , Pankaj Gupta , Pierre Morel , Yoshinori Sato , Scott Cheloha , "Rafael J. Wysocki" , linux-kernel@vger.kernel.org, Thomas Gleixner , Thiago Jung Bauermann , "Aneesh Kumar K.V" , Joe Perches , Mike Rapoport X-BeenThere: virtualization@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Linux virtualization List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: virtualization-bounces@lists.linux-foundation.org Sender: "Virtualization" 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. _______________________________________________ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization