All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: gregkh@linuxfoundation.org, akpm@linux-foundation.org,
	aneesh.kumar@linux.ibm.com, anshuman.khandual@arm.com,
	anton@ozlabs.org, ardb@kernel.org, bauerman@linux.ibm.com,
	benh@kernel.crashing.org, bhe@redhat.com, borntraeger@de.ibm.com,
	bp@alien8.de, catalin.marinas@arm.com, cheloha@linux.ibm.com,
	christophe.leroy@c-s.fr, dalias@libc.org,
	dan.j.williams@intel.com, dave.hansen@linux.intel.com,
	dave.jiang@intel.com, gor@linux.ibm.com, hca@linux.ibm.com,
	hpa@zytor.com, jasowang@redhat.com, joe@perches.com,
	justin.he@arm.com, ldufour@linux.ibm.com, lenb@kernel.org,
	luto@kernel.org, mhocko@kernel.org, michel@lespinasse.org,
	mingo@redhat.com, mpe@ellerman.id.au, mst@redhat.com,
	nathanl@linux.ibm.com, npiggin@gmail.com, osalvador@suse.de,
	pankaj.gupta.linux@gmail.com, pankaj.gupta@ionos.com,
	pasha.tatashin@soleen.com, paulus@samba.org,
	peterz@infradead.org, pmorel@linux.ibm.com,
	rafael.j.wysocki@intel.com, richard.weiyang@linux.alibaba.com,
	rjw@rjwysocki.net, rppt@kernel.org, slyfox@gentoo.org,
	songmuchun@bytedance.com, stable@vger.kernel.org,
	torvalds@linux-foundation.org, vbabka@suse.cz,
	vishal.l.verma@intel.com, vkuznets@redhat.com,
	wangkefeng.wang@huawei.com, will@kernel.org,
	ysato@users.sourceforge.jp
Subject: Re: FAILED: patch "[PATCH] mm/memory_hotplug: use "unsigned long" for PFN in" failed to apply to 4.14-stable tree
Date: Fri, 17 Sep 2021 14:06:16 +0200	[thread overview]
Message-ID: <5873f775-a9a8-7d8e-f8a6-a314ad14a6ef@redhat.com> (raw)
In-Reply-To: <1631796969176240@kroah.com>

On 16.09.21 14:56, gregkh@linuxfoundation.org wrote:
> 
> The patch below does not apply to the 4.14-stable tree.
> If someone wants it applied there, or to any other stable or longterm
> tree, then please email the backport, including the original git commit
> id to <stable@vger.kernel.org>.
> 
> thanks,
> 
> greg k-h
> 
> ------------------ original commit in Linus's tree ------------------
> 
>  From 7cf209ba8a86410939a24cb1aeb279479a7e0ca6 Mon Sep 17 00:00:00 2001
> From: David Hildenbrand <david@redhat.com>
> Date: Tue, 7 Sep 2021 19:54:59 -0700
> Subject: [PATCH] mm/memory_hotplug: use "unsigned long" for PFN in
>   zone_for_pfn_range()
> 
> Patch series "mm/memory_hotplug: preparatory patches for new online policy and memory"
> 
> These are all cleanups and one fix previously sent as part of [1]:
> [PATCH v1 00/12] mm/memory_hotplug: "auto-movable" online policy and memory
> groups.
> 
> These patches make sense even without the other series, therefore I pulled
> them out to make the other series easier to digest.
> 
> [1] https://lkml.kernel.org/r/20210607195430.48228-1-david@redhat.com
> 
> This patch (of 4):
> 
> Checkpatch complained on a follow-up patch that we are using "unsigned"
> here, which defaults to "unsigned int" and checkpatch is correct.
> 
> 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.
> 
> Use "unsigned long" instead, just as we do in other places when handling
> PFNs.  This can bite us once we have physical addresses in the range of
> multiple TB.
> 
> Link: https://lkml.kernel.org/r/20210712124052.26491-2-david@redhat.com
> Fixes: e5e689302633 ("mm, memory_hotplug: display allowed zones in the preferred ordering")
> Signed-off-by: David Hildenbrand <david@redhat.com>
> Reviewed-by: Pankaj Gupta <pankaj.gupta@ionos.com>
> Reviewed-by: Muchun Song <songmuchun@bytedance.com>
> Reviewed-by: Oscar Salvador <osalvador@suse.de>
> Cc: David Hildenbrand <david@redhat.com>
> Cc: Vitaly Kuznetsov <vkuznets@redhat.com>
> Cc: "Michael S. Tsirkin" <mst@redhat.com>
> Cc: Jason Wang <jasowang@redhat.com>
> Cc: Pankaj Gupta <pankaj.gupta.linux@gmail.com>
> Cc: Wei Yang <richard.weiyang@linux.alibaba.com>
> Cc: Michal Hocko <mhocko@kernel.org>
> Cc: Dan Williams <dan.j.williams@intel.com>
> Cc: Anshuman Khandual <anshuman.khandual@arm.com>
> Cc: Dave Hansen <dave.hansen@linux.intel.com>
> Cc: Vlastimil Babka <vbabka@suse.cz>
> Cc: Mike Rapoport <rppt@kernel.org>
> Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
> Cc: Len Brown <lenb@kernel.org>
> Cc: Pavel Tatashin <pasha.tatashin@soleen.com>
> Cc: Heiko Carstens <hca@linux.ibm.com>
> Cc: Michael Ellerman <mpe@ellerman.id.au>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: virtualization@lists.linux-foundation.org
> Cc: Andy Lutomirski <luto@kernel.org>
> Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>
> Cc: Anton Blanchard <anton@ozlabs.org>
> Cc: Ard Biesheuvel <ardb@kernel.org>
> Cc: Baoquan He <bhe@redhat.com>
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Cc: Borislav Petkov <bp@alien8.de>
> Cc: Christian Borntraeger <borntraeger@de.ibm.com>
> Cc: Christophe Leroy <christophe.leroy@c-s.fr>
> Cc: Dave Jiang <dave.jiang@intel.com>
> Cc: "H. Peter Anvin" <hpa@zytor.com>
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: Jia He <justin.he@arm.com>
> Cc: Joe Perches <joe@perches.com>
> Cc: Kefeng Wang <wangkefeng.wang@huawei.com>
> Cc: Laurent Dufour <ldufour@linux.ibm.com>
> Cc: Michel Lespinasse <michel@lespinasse.org>
> Cc: Nathan Lynch <nathanl@linux.ibm.com>
> Cc: Nicholas Piggin <npiggin@gmail.com>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Pierre Morel <pmorel@linux.ibm.com>
> Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
> Cc: Rich Felker <dalias@libc.org>
> Cc: Scott Cheloha <cheloha@linux.ibm.com>
> Cc: Sergei Trofimovich <slyfox@gentoo.org>
> Cc: Thiago Jung Bauermann <bauerman@linux.ibm.com>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Vasily Gorbik <gor@linux.ibm.com>
> Cc: Vishal Verma <vishal.l.verma@intel.com>
> Cc: Will Deacon <will@kernel.org>
> Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
> 
> diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h
> index a7fd2c3ccb77..d01b504ce06f 100644
> --- a/include/linux/memory_hotplug.h
> +++ b/include/linux/memory_hotplug.h
> @@ -339,8 +339,8 @@ extern void sparse_remove_section(struct mem_section *ms,
>   		unsigned long map_offset, struct vmem_altmap *altmap);
>   extern struct page *sparse_decode_mem_map(unsigned long coded_mem_map,
>   					  unsigned long pnum);
> -extern struct zone *zone_for_pfn_range(int online_type, int nid, unsigned start_pfn,
> -		unsigned long nr_pages);
> +extern struct zone *zone_for_pfn_range(int online_type, int nid,
> +		unsigned long start_pfn, unsigned long nr_pages);
>   extern int arch_create_linear_mapping(int nid, u64 start, u64 size,
>   				      struct mhp_params *params);
>   void arch_remove_linear_mapping(u64 start, u64 size);
> diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
> index f829805fe1ca..fa349acb8810 100644
> --- a/mm/memory_hotplug.c
> +++ b/mm/memory_hotplug.c
> @@ -708,8 +708,8 @@ static inline struct zone *default_zone_for_pfn(int nid, unsigned long start_pfn
>   	return movable_node_enabled ? movable_zone : kernel_zone;
>   }
>   
> -struct zone *zone_for_pfn_range(int online_type, int nid, unsigned start_pfn,
> -		unsigned long nr_pages)
> +struct zone *zone_for_pfn_range(int online_type, int nid,
> +		unsigned long start_pfn, unsigned long nr_pages)
>   {
>   	if (online_type == MMOP_ONLINE_KERNEL)
>   		return default_kernel_zone_for_pfn(nid, start_pfn, nr_pages);
> 

AFAIKS, there are only contextual differences and they are pretty easy 
to sort out. @Greg, I can send a backport if it helps.

-- 
Thanks,

David / dhildenb


       reply	other threads:[~2021-09-17 12:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1631796969176240@kroah.com>
2021-09-17 12:06 ` David Hildenbrand [this message]
2021-09-17 12:17   ` FAILED: patch "[PATCH] mm/memory_hotplug: use "unsigned long" for PFN in" failed to apply to 4.14-stable tree Greg KH
2021-09-20 11:22 ` [PATCH 4.14 STABLE] mm/memory_hotplug: use "unsigned long" for PFN in zone_for_pfn_range() David Hildenbrand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5873f775-a9a8-7d8e-f8a6-a314ad14a6ef@redhat.com \
    --to=david@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=aneesh.kumar@linux.ibm.com \
    --cc=anshuman.khandual@arm.com \
    --cc=anton@ozlabs.org \
    --cc=ardb@kernel.org \
    --cc=bauerman@linux.ibm.com \
    --cc=benh@kernel.crashing.org \
    --cc=bhe@redhat.com \
    --cc=borntraeger@de.ibm.com \
    --cc=bp@alien8.de \
    --cc=catalin.marinas@arm.com \
    --cc=cheloha@linux.ibm.com \
    --cc=christophe.leroy@c-s.fr \
    --cc=dalias@libc.org \
    --cc=dan.j.williams@intel.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=dave.jiang@intel.com \
    --cc=gor@linux.ibm.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hca@linux.ibm.com \
    --cc=hpa@zytor.com \
    --cc=jasowang@redhat.com \
    --cc=joe@perches.com \
    --cc=justin.he@arm.com \
    --cc=ldufour@linux.ibm.com \
    --cc=lenb@kernel.org \
    --cc=luto@kernel.org \
    --cc=mhocko@kernel.org \
    --cc=michel@lespinasse.org \
    --cc=mingo@redhat.com \
    --cc=mpe@ellerman.id.au \
    --cc=mst@redhat.com \
    --cc=nathanl@linux.ibm.com \
    --cc=npiggin@gmail.com \
    --cc=osalvador@suse.de \
    --cc=pankaj.gupta.linux@gmail.com \
    --cc=pankaj.gupta@ionos.com \
    --cc=pasha.tatashin@soleen.com \
    --cc=paulus@samba.org \
    --cc=peterz@infradead.org \
    --cc=pmorel@linux.ibm.com \
    --cc=rafael.j.wysocki@intel.com \
    --cc=richard.weiyang@linux.alibaba.com \
    --cc=rjw@rjwysocki.net \
    --cc=rppt@kernel.org \
    --cc=slyfox@gentoo.org \
    --cc=songmuchun@bytedance.com \
    --cc=stable@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=vbabka@suse.cz \
    --cc=vishal.l.verma@intel.com \
    --cc=vkuznets@redhat.com \
    --cc=wangkefeng.wang@huawei.com \
    --cc=will@kernel.org \
    --cc=ysato@users.sourceforge.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.