From: "Harry (Hyeonggon) Yoo" <42.hyeyoo@gmail.com>
To: Dave Hansen <dave.hansen@intel.com>
Cc: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>,
linux-kernel@vger.kernel.org, osalvador@suse.de,
byungchul@sk.com, dave.hansen@linux.intel.com, luto@kernel.org,
peterz@infradead.org, akpm@linux-foundation.org,
max.byungchul.park@sk.com, max.byungchul.park@gmail.com
Subject: Re: [RFC 1/1] x86/vmemmap: Add missing update of PML4 table / PML5 table entry
Date: Sat, 15 Feb 2025 09:20:36 +0900 [thread overview]
Message-ID: <Z6_d1MvorGFpxdU1@MacBook-Air-5.local> (raw)
In-Reply-To: <25b9d3f5-bfe8-48a9-b11b-819d19cfae1e@intel.com>
On Fri, Feb 14, 2025 at 11:57:50AM -0800, Dave Hansen wrote:
> On 2/14/25 11:51, Gwan-gyeong Mun wrote:
> > when performing vmemmap populate, if the entry of the PML4 table/PML5 table
> > pointing to the target virtual address has never been updated, a page fault
> > occurs when the memset(start) called from the vmemmap_use_new_sub_pmd()
> > execution flow.
>
> "Page fault" meaning oops? Or something that we manage to handle and
> return from without oopsing?
It means oops, because the kernel accesses part of vmemmap that's not
populated (yet) in current process's page table.
This oops was observed after increasing the size of struct page (as a part of
developing a debug feature), but the real cause is that page table entries are
only installed in init_mm's page table and then sync'd later, but in the mean
time the process that triggered hot-plug accesses new portion of vmemmap.
If the process does not directly use the page table of init_mm (like swapper)
this oops can occur (e.g., I was able to trigger with `sudo modprobe hmm_test`
after increasing the size of struct page).
> > This fixes the problem of using the virtual address without updating the
> > entry in the PML4 table or PML5 table. But this is a temporary solution to
> > prevent page fault problems, and it requires improvement of the routine
> > that updates the missing entry in the PML4 table or PML5 table.
>
> Can we please skip past the band-aid and go to the real fix?
Yes, of course it'd best to skip a temporary fix.
The intention is to report/discuss the problem and a fix as a starting point.
--
Harry
next prev parent reply other threads:[~2025-02-15 0:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-14 19:51 [RFC 0/1] " Gwan-gyeong Mun
2025-02-14 19:51 ` [RFC 1/1] " Gwan-gyeong Mun
2025-02-14 19:57 ` Dave Hansen
2025-02-15 0:20 ` Harry (Hyeonggon) Yoo [this message]
2025-02-15 0:29 ` Dave Hansen
2025-02-17 11:40 ` Gwan-gyeong Mun
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=Z6_d1MvorGFpxdU1@MacBook-Air-5.local \
--to=42.hyeyoo@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=byungchul@sk.com \
--cc=dave.hansen@intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=gwan-gyeong.mun@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=max.byungchul.park@gmail.com \
--cc=max.byungchul.park@sk.com \
--cc=osalvador@suse.de \
--cc=peterz@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
all inboxes | Powered by JetHome®