linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: "Matthew Wilcox (Oracle)" <willy@infradead.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 13:07:51 -0800	[thread overview]
Message-ID: <20231108130751.f515f0f3c5ce5fb5b1d70fb0@linux-foundation.org> (raw)
In-Reply-To: <20231108182809.602073-3-willy@infradead.org>

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?

> fail), so use unmap_mapping_folio() instead.
> 
> This also saves various calls to compound_head() hidden in lock_page(),
> put_page(), etc.
> 
> Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
> Fixes: 793917d997df ("mm/readahead: Add large folio readahead")
> Cc: stable@vger.kernel.org

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?



  reply	other threads:[~2023-11-08 21:08 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 [this message]
2023-11-08 21:48     ` Matthew Wilcox
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=20231108130751.f515f0f3c5ce5fb5b1d70fb0@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=linux-mm@kvack.org \
    --cc=naoya.horiguchi@nec.com \
    --cc=stable@vger.kernel.org \
    --cc=willy@infradead.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