linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Rik van Riel <riel@surriel.com>
To: Oscar Salvador <osalvador@suse.de>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	kernel-team@fb.com,  Miaohe Lin <linmiaohe@huawei.com>,
	Naoya Horiguchi <naoya.horiguchi@nec.com>,
	Mel Gorman <mgorman@suse.de>,
	 Johannes Weiner <hannes@cmpxchg.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	stable@vger.kernel.org
Subject: Re: [PATCH] mm,hwpoison: unmap poisoned page before invalidation
Date: Tue, 29 Mar 2022 11:49:53 -0400	[thread overview]
Message-ID: <47936edb3b0f9c9f04f0d0d2e7f38383a22b6a3d.camel@surriel.com> (raw)
In-Reply-To: <YkF5Jd6fauTRvVVg@localhost.localdomain>

[-- Attachment #1: Type: text/plain, Size: 851 bytes --]

On Mon, 2022-03-28 at 11:00 +0200, Oscar Salvador wrote:
> On Fri, Mar 25, 2022 at 04:14:28PM -0400, Rik van Riel wrote:
> > +                       if (invalidate_inode_page(page))
> > +                               poisonret = VM_FAULT_NOPAGE;
> 
> What is the effect of returning VM_FAULT_NOPAGE?
> I take that we are cool because the pte has been installed and points
> to
> a new page? (I could not find where that is being done).
> 
It results in us returning to userspace as if the page
fault had been handled, resulting in a second fault on
the same address.

However, now the page is no longer in the page cache,
and we can read it in from disk, to a page that is not
hardware poisoned, and we can then use that second page
without issues.

-- 
All Rights Reversed.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2022-03-29 15:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-25 20:14 [PATCH] mm,hwpoison: unmap poisoned page before invalidation Rik van Riel
2022-03-26  7:48 ` Miaohe Lin
2022-03-26 20:14   ` Rik van Riel
2022-03-28  2:14     ` Miaohe Lin
2022-03-28  2:24       ` Rik van Riel
2022-03-28  2:41         ` Miaohe Lin
2022-03-28  9:00 ` Oscar Salvador
2022-03-29 15:49   ` Rik van Riel [this message]
2022-03-29 19:13     ` Oscar Salvador
2022-03-28 11:01 ` HORIGUCHI NAOYA(堀口 直也)
2022-03-29 19:13 ` Oscar Salvador

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=47936edb3b0f9c9f04f0d0d2e7f38383a22b6a3d.camel@surriel.com \
    --to=riel@surriel.com \
    --cc=akpm@linux-foundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=kernel-team@fb.com \
    --cc=linmiaohe@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    --cc=naoya.horiguchi@nec.com \
    --cc=osalvador@suse.de \
    --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;
as well as URLs for NNTP newsgroup(s).