From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:52552 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753591AbdBGK7a (ORCPT ); Tue, 7 Feb 2017 05:59:30 -0500 Date: Tue, 7 Feb 2017 11:59:29 +0100 From: Greg KH To: Toshi Kani Cc: stable@vger.kernel.org, akpm@linux-foundation.org, arbab@linux.vnet.ibm.com, dan.j.williams@intel.com, abanman@sgi.com, rientjes@google.com, torvalds@linux-foundation.org Subject: Re: [PATCH] base/memory, hotplug: fix a kernel oops in show_valid_zones() Message-ID: <20170207105929.GA6826@kroah.com> References: <20170206223301.29752-1-toshi.kani@hpe.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170206223301.29752-1-toshi.kani@hpe.com> Sender: stable-owner@vger.kernel.org List-ID: On Mon, Feb 06, 2017 at 03:33:01PM -0700, Toshi Kani wrote: > Reading a sysfs "memoryN/valid_zones" file leads to the following oops > when the first page of a range is not backed by struct page. > show_valid_zones() assumes that 'start_pfn' is always valid for > page_zone(). > > BUG: unable to handle kernel paging request at ffffea017a000000 > IP: show_valid_zones+0x6f/0x160 > > This issue may happen on x86-64 systems with 64GiB or more memory since > their memory block size is bumped up to 2GiB. [1] An example of such > systems is desribed below. 0x3240000000 is only aligned by 1GiB and > this memory block starts from 0x3200000000, which is not backed by > struct page. > > BIOS-e820: [mem 0x0000003240000000-0x000000603fffffff] usable > > Since test_pages_in_a_zone() already checks holes, fix this issue by > extending this function to return 'valid_start' and 'valid_end' for a > given range. show_valid_zones() then proceeds with the valid range. > > [1] 'Commit bdee237c0343 ("x86: mm: Use 2GB memory block size on > large-memory x86-64 systems")' > > Link: http://lkml.kernel.org/r/20170127222149.30893-3-toshi.kani@hpe.com > Signed-off-by: Toshi Kani > Cc: Greg Kroah-Hartman > Cc: Zhang Zhen > Cc: Reza Arbab > Cc: David Rientjes > Cc: Dan Williams > Cc: [4.4+] > > Signed-off-by: Andrew Morton > Signed-off-by: Linus Torvalds > --- > This patch backports commit a96dfddbcc to 4.4. This is 2/2 of patch-set. > The 1/2 patch is commit deb88a2a19e that applies/has applied cleanly to 4.4. > Link: http://www.spinics.net/lists/stable/msg158242.html Thanks, now queued up. greg k-h