linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Naoya Horiguchi <naoya.horiguchi@nec.com>,
	linux-mm@kvack.org, stable@vger.kernel.org
Subject: Re: [PATCH 2/6] mm: Convert __do_fault() to use a folio
Date: Wed, 8 Nov 2023 21:48:20 +0000	[thread overview]
Message-ID: <ZUwCJJy7kqrMPS4M@casper.infradead.org> (raw)
In-Reply-To: <20231108130751.f515f0f3c5ce5fb5b1d70fb0@linux-foundation.org>

On Wed, Nov 08, 2023 at 01:07:51PM -0800, Andrew Morton wrote:
> On Wed,  8 Nov 2023 18:28:05 +0000 "Matthew Wilcox (Oracle)" <willy@infradead.org> wrote:
> 
> > Convert vmf->page to a folio as soon as we're going to use it.  This fixes
> > a bug if the fault handler returns a tail page with hardware poison;
> > tail pages have an invalid page->index, so we would fail to unmap the
> > page from the page tables.  We actually have to unmap the entire folio (or
> > mapping_evict_folio() will
> 
> Would we merely fail to unmap or is there a possibility of unmapping
> some random innocent other page?
> 
> How might this bug manifest in userspace, worst case?

I think we might unmap a random other page in this file.  But then the
next fault on that page will bring it back in, so it's only going to be
a tiny performance blip.  And we've just found a hwpoisoned page which
is going to cause all kinds of other excitement, so I doubt it'll be
noticed in the grand scheme of things.

> As it's cc:stable I'll pluck this patch out of the rest of the series
> and shall stage it for 6.7-rcX, via mm-hotfixes-unstable ->
> mm-hotfixes-stable -> Linus.  Unless this bug is a very minor thing?

I think it's minor enough that it can wait for 6.8.  Unless anyone
disagrees?


  reply	other threads:[~2023-11-08 21:48 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-08 18:28 [PATCH 0/6] Fix fault handler's handling of poisoned tail pages Matthew Wilcox (Oracle)
2023-11-08 18:28 ` [PATCH 1/6] mm: Make mapping_evict_folio() the preferred way to evict clean folios Matthew Wilcox (Oracle)
2023-11-08 18:28 ` [PATCH 2/6] mm: Convert __do_fault() to use a folio Matthew Wilcox (Oracle)
2023-11-08 21:07   ` Andrew Morton
2023-11-08 21:48     ` Matthew Wilcox [this message]
2023-11-08 18:28 ` [PATCH 3/6] mm: Use mapping_evict_folio() in truncate_error_page() Matthew Wilcox (Oracle)
2023-11-08 18:28 ` [PATCH 4/6] mm: Convert soft_offline_in_use_page() to use a folio Matthew Wilcox (Oracle)
2023-11-08 18:28 ` [PATCH 5/6] mm: Convert isolate_page() to mf_isolate_folio() Matthew Wilcox (Oracle)
2023-11-08 18:28 ` [PATCH 6/6] mm: Remove invalidate_inode_page() Matthew Wilcox (Oracle)
2023-11-08 21:10 ` [PATCH 0/6] Fix fault handler's handling of poisoned tail pages Andrew Morton
2023-11-08 21:49   ` Matthew Wilcox

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=ZUwCJJy7kqrMPS4M@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-mm@kvack.org \
    --cc=naoya.horiguchi@nec.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