From: Greg KH <gregkh@linuxfoundation.org>
To: Toshi Kani <toshi.kani@hpe.com>
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()
Date: Tue, 7 Feb 2017 11:59:29 +0100 [thread overview]
Message-ID: <20170207105929.GA6826@kroah.com> (raw)
In-Reply-To: <20170206223301.29752-1-toshi.kani@hpe.com>
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 <toshi.kani@hpe.com>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: Zhang Zhen <zhenzhang.zhang@huawei.com>
> Cc: Reza Arbab <arbab@linux.vnet.ibm.com>
> Cc: David Rientjes <rientjes@google.com>
> Cc: Dan Williams <dan.j.williams@intel.com>
> Cc: <stable@vger.kernel.org> [4.4+]
>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
> ---
> 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
prev parent reply other threads:[~2017-02-07 10:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-06 22:33 [PATCH] base/memory, hotplug: fix a kernel oops in show_valid_zones() Toshi Kani
2017-02-07 10:59 ` Greg KH [this message]
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=20170207105929.GA6826@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=abanman@sgi.com \
--cc=akpm@linux-foundation.org \
--cc=arbab@linux.vnet.ibm.com \
--cc=dan.j.williams@intel.com \
--cc=rientjes@google.com \
--cc=stable@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=toshi.kani@hpe.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).