From: David Hildenbrand <david@redhat.com>
To: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, x86@kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Ingo Molnar <mingo@kernel.org>,
Dave Hansen <dave.hansen@linux.intel.com>,
Andy Lutomirski <luto@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Thomas Gleixner <tglx@linutronix.de>,
Borislav Petkov <bp@alien8.de>, Rik van Riel <riel@surriel.com>,
"H. Peter Anvin" <hpa@zytor.com>,
Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [PATCH v1] kernel/fork: only call untrack_pfn_clear() on VMAs duplicated for fork()
Date: Thu, 24 Apr 2025 14:52:07 +0200 [thread overview]
Message-ID: <d63c1eb2-d026-4ef5-bb0e-531a0c390f77@redhat.com> (raw)
In-Reply-To: <9a9103db-95ca-47d4-921e-42b8368ffcaf@lucifer.local>
>>> But maybe I misunderstand your approach :) Happy to obviously look and if
>>> not like some crazy thing just for PAT (you can understand why I would not
>>> like this) will be supportive :>)
>>
>> This is something quick (well, longer than I wish it would take) that seems to
>> work. There are smaller pat-internal cleanups to be had on top of this, and
>> the new functions shall be documented.
>>
>>
>> Observe how:
>> * We remove VM_PAT and that weird VM flags manipulation + "locked" flag
>> * We remove any traces of the nasty tracking handling from mremap+fork code
>> * Just like anon_vma_name, it hooks into vm_area_dup()/vm_area_free().
>> * We remove the page table lookup via get_pat_info()->... completely
>> * We remove the VMA parameter from PAT code completely
>> * We reduce the track/untrack/sanitize interface to 3 functions
>
> Yeah this is all lovely!
>
> OK this should hopefully be workable then!
Okay, let me polish that up (and see if there is any reasonable way to
split it up), and write some doc+descriptions .. and do some more testing.
The VMA split reproducer is definitely happy with this already.
--
Cheers,
David / dhildenb
prev parent reply other threads:[~2025-04-24 12:52 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-22 14:49 David Hildenbrand
2025-04-22 14:54 ` David Hildenbrand
2025-04-23 14:42 ` Lorenzo Stoakes
2025-04-23 15:30 ` David Hildenbrand
2025-04-23 14:41 ` Lorenzo Stoakes
2025-04-23 19:30 ` David Hildenbrand
2025-04-24 7:21 ` Lorenzo Stoakes
2025-04-24 8:45 ` David Hildenbrand
2025-04-24 9:49 ` Lorenzo Stoakes
2025-04-24 12:33 ` David Hildenbrand
2025-04-24 12:49 ` Lorenzo Stoakes
2025-04-24 12:52 ` David Hildenbrand [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=d63c1eb2-d026-4ef5-bb0e-531a0c390f77@redhat.com \
--to=david@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lorenzo.stoakes@oracle.com \
--cc=luto@kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=riel@surriel.com \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=x86@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
all inboxes | Powered by JetHome®