From: Jason Gunthorpe <jgg@nvidia.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: ankita@nvidia.com, vsethi@nvidia.com, mochs@nvidia.com,
skolothumtho@nvidia.com, alex@shazbot.org, linmiaohe@huawei.com,
nao.horiguchi@gmail.com, cjia@nvidia.com, zhiw@nvidia.com,
kjaju@nvidia.com, yishaih@nvidia.com, kevin.tian@intel.com,
kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-mm@kvack.org
Subject: Re: [PATCH v1 0/3] mm: fixup pfnmap memory failure handling
Date: Thu, 11 Dec 2025 19:14:22 -0400 [thread overview]
Message-ID: <aTtQTj98gZBgaVXV@nvidia.com> (raw)
In-Reply-To: <20251211121119.0ebfd65ed69b5d5f6537710a@linux-foundation.org>
On Thu, Dec 11, 2025 at 12:11:19PM -0800, Andrew Morton wrote:
> On Thu, 11 Dec 2025 07:06:00 +0000 <ankita@nvidia.com> wrote:
>
> > It was noticed during 6.19 merge window that the patch series [1] to
> > introduce memory failure handling for the PFNMAP memory is broken.
> >
> > The expected behaviour of the series is to allow a driver (such as
> > nvgrace-gpu) to register its device memory with the mm. The mm would
> > then handle the poison on that registered memory region.
> >
> > However, the following issues were identified in the patch series.
> > 1. Faulty use of PFN instead of mapping file page offset to derive
> > the usermode process VA corresponding to the mapping to PFN.
> > 2. nvgrace-gpu code called the registration at mmap, exposing it
> > to corruption. This may happen, when multiple mmap were called on the
> > same BAR. This issue was also noticed by Linus Torvalds who reverted
> > the patch [2].
> >
> > This patch series addresses those issues.
> >
> > Patch 1/3 fixes the first issue by translating PFN to page offset
> > and using that information to send the SIGBUS to the mapping process.
> > Patch 2/3 add stubs for CONFIG_MEMORY_FAILURE disabled.
> > Patch 3/3 is a resend of the reverted change to register the device
> > memory at the time of open instead of mmap.
> >
>
> Strictly speaking, [1/3] is suitable for merging in the 6.19-rcX cycle
> because it fixes a 6.19-rcX thing. But [2/3] and [3/3] don't fix
> anything and hence should be considered 6.20-rc1 material. Yes?
Well, technically, none of this is "rc" because Linus removed the only
user in the merge..
> So unless I'm missing something, I'll grab [1/3] as a 6.19-rcX hotfix.
> Please prepare the other two patches as a standalone series for
> addition to mm.git after 6.19-rc1 is released.
The plan was to unrevert the revert that Linus did during the merge
while the merge window is still open as an alternative bug fix to the
revert that Linus did.
So it would be great if you could grab this for the trailing merge
window period.
Jason
prev parent reply other threads:[~2025-12-11 23:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-11 7:06 ankita
2025-12-11 7:06 ` [PATCH v1 1/3] mm: fixup pfnmap memory failure handling to use pgoff ankita
2025-12-11 7:06 ` [PATCH v1 2/3] mm: add stubs for PFNMAP memory failure registration functions ankita
2025-12-11 7:06 ` [PATCH v1 3/3] vfio/nvgrace-gpu: register device memory for poison handling ankita
2025-12-12 23:47 ` Alex Williamson
2025-12-13 4:52 ` Ankit Agrawal
2025-12-11 20:11 ` [PATCH v1 0/3] mm: fixup pfnmap memory failure handling Andrew Morton
2025-12-11 23:14 ` Jason Gunthorpe [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=aTtQTj98gZBgaVXV@nvidia.com \
--to=jgg@nvidia.com \
--cc=akpm@linux-foundation.org \
--cc=alex@shazbot.org \
--cc=ankita@nvidia.com \
--cc=cjia@nvidia.com \
--cc=kevin.tian@intel.com \
--cc=kjaju@nvidia.com \
--cc=kvm@vger.kernel.org \
--cc=linmiaohe@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mochs@nvidia.com \
--cc=nao.horiguchi@gmail.com \
--cc=skolothumtho@nvidia.com \
--cc=vsethi@nvidia.com \
--cc=yishaih@nvidia.com \
--cc=zhiw@nvidia.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