From: Zi Yan <ziy@nvidia.com>
To: Lance Yang <lance.yang@linux.dev>
Cc: akpm@linux-foundation.org, david@kernel.org,
baolin.wang@linux.alibaba.com, liam@infradead.org,
nico.pache@linux.dev, ryan.roberts@arm.com, dev.jain@arm.com,
baohua@kernel.org, usama.arif@linux.dev, kas@kernel.org,
ljs@kernel.org, vbabka@kernel.org, rppt@kernel.org,
surenb@google.com, mhocko@suse.com, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/1] mm: disallow raw PFN mappings of huge/shared zeropage
Date: Mon, 21 Sep 2026 11:30:56 -0400 [thread overview]
Message-ID: <FD82BF38-AC83-402F-97DA-F14B5171AFE1@nvidia.com> (raw)
In-Reply-To: <20260921054225.28537-1-lance.yang@linux.dev>
On 21 Sep 2026, at 1:42, Lance Yang wrote:
> From: Lance Yang <lance.yang@linux.dev>
>
> Handling the huge/shared zeropage correctly in vmf_insert_pfn_pmd() and
> vmf_insert_pfn_prot() is more involved. We would need to check whether the
> VMA allows it and keep the mapping read-only, similar to the checks in
> vm_mixed_ok().
>
> No in-tree user needs that support, so reject these mappings with
> VM_FAULT_SIGBUS rather than complicate the code for now.
>
> Link: https://lore.kernel.org/all/20260917121010.60966-1-lance.yang@linux.dev/
> Suggested-by: Kiryl Shutsemau (Meta) <kas@kernel.org>
> Suggested-by: David Hildenbrand (Arm) <david@kernel.org>
> Reviewed-by: Kiryl Shutsemau (Meta) <kas@kernel.org>
> Signed-off-by: Lance Yang <lance.yang@linux.dev>
> ---
> v1 -> v2:
> - Reject the shared zeropage in vmf_insert_pfn_prot() (per Kiryl) - thanks!
> - Explain the VMA validation and read-only requirements (per David) - thanks!
> - Pick up Kiryl's Reviewed-by tag.
> - https://lore.kernel.org/all/20260917121010.60966-1-lance.yang@linux.dev/
>
> mm/huge_memory.c | 3 +++
> mm/memory.c | 3 +++
> 2 files changed, 6 insertions(+)
>
Makes sense to me.
Acked-by: Zi Yan <ziy@nvidia.com>
Best Regards,
Yan, Zi
prev parent reply other threads:[~2026-09-21 15:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-21 5:42 [PATCH v2 1/1] mm: disallow raw PFN mappings of huge/shared zeropage Lance Yang
2026-09-21 9:27 ` David Hildenbrand (Arm)
2026-09-21 12:03 ` Lorenzo Stoakes (ARM)
2026-09-21 15:30 ` Zi Yan [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=FD82BF38-AC83-402F-97DA-F14B5171AFE1@nvidia.com \
--to=ziy@nvidia.com \
--cc=akpm@linux-foundation.org \
--cc=baohua@kernel.org \
--cc=baolin.wang@linux.alibaba.com \
--cc=david@kernel.org \
--cc=dev.jain@arm.com \
--cc=kas@kernel.org \
--cc=lance.yang@linux.dev \
--cc=liam@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ljs@kernel.org \
--cc=mhocko@suse.com \
--cc=nico.pache@linux.dev \
--cc=rppt@kernel.org \
--cc=ryan.roberts@arm.com \
--cc=surenb@google.com \
--cc=usama.arif@linux.dev \
--cc=vbabka@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.