public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Cc: "# v4 . 3+" <stable@vger.kernel.org>
Subject: Re: [PATCH] numa: fix /proc/<pid>/numa_maps for THP
Date: Mon, 4 Apr 2016 11:45:45 -0700	[thread overview]
Message-ID: <20160404184545.GB32131@kroah.com> (raw)
In-Reply-To: <1459783440-13748-1-git-send-email-gerald.schaefer@de.ibm.com>

On Mon, Apr 04, 2016 at 05:24:00PM +0200, Gerald Schaefer wrote:
> In gather_pte_stats() a THP pmd is cast into a pte, which is wrong because the
> layouts may differ depending on the architecture. On s390 this will lead to
> inaccurate numap_maps accounting in /proc because of misguided pte_present()
> and pte_dirty() checks on the fake pte.
> 
> On other architectures pte_present() and pte_dirty() may work by chance, but
> there may be an issue with direct-access (dax) mappings w/o underlying struct
> pages when HAVE_PTE_SPECIAL is set and THP is available. In vm_normal_page()
> the fake pte will be checked with pte_special() and because there is no
> "special" bit in a pmd, this will always return false and the VM_PFNMAP |
> VM_MIXEDMAP checking will be skipped. On dax mappings w/o struct pages, an
> invalid struct page pointer would then be returned that can crash the kernel.
> 
> This patch fixes the numa_maps THP handling by introducing new "_pmd" variants
> of the can_gather_numa_stats() and vm_normal_page() functions.
> 
> Signed-off-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
> Cc: <stable@vger.kernel.org> # v4.3+

What is the git commit id of this in Linus's tree?

thanks,

greg k-h

  reply	other threads:[~2016-04-04 18:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-04 15:24 [PATCH] numa: fix /proc/<pid>/numa_maps for THP Gerald Schaefer
2016-04-04 18:45 ` Greg KH [this message]
  -- strict thread matches above, loose matches on Subject: below --
2016-04-04 15:33 Gerald Schaefer
2016-04-04 15:51 ` kbuild test robot
2016-04-04 15:56 ` kbuild test robot

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=20160404184545.GB32131@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=gerald.schaefer@de.ibm.com \
    --cc=stable@vger.kernel.org \
    /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