[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 4 Apr 2024 21:20:06 +0200
From: David Hildenbrand <david@...hat.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org, x86@...nel.org,
Peter Zijlstra <peterz@...radead.org>, Ingo Molnar <mingo@...hat.com>,
Thomas Gleixner <tglx@...utronix.de>, Christoph Hellwig <hch@....de>,
Borislav Petkov <bp@...en8.de>, "H. Peter Anvin" <hpa@...or.com>,
Andy Lutomirski <luto@...nel.org>, Dave Hansen
<dave.hansen@...ux.intel.com>, Fei Li <fei1.li@...el.com>,
Nathan Chancellor <nathan@...nel.org>, Wupeng Ma <mawupeng1@...wei.com>,
Ingo Molnar <mingo@...nel.org>
Subject: Re: [PATCH v2 2/3] x86/mm/pat: fix VM_PAT handling in COW mappings
On 04.04.24 00:12, Andrew Morton wrote:
> On Wed, 3 Apr 2024 23:21:30 +0200 David Hildenbrand <david@...hat.com> wrote:
>
>> PAT handling won't do the right thing in COW mappings: the first PTE
>> (or, in fact, all PTEs) can be replaced during write faults to point at
>> anon folios. Reliably recovering the correct PFN and cachemode using
>> follow_phys() from PTEs will not work in COW mappings.
>>
>> ...
>>
>> Reported-by: Wupeng Ma <mawupeng1@...wei.com>
>> Closes: https://lkml.kernel.org/r/20240227122814.3781907-1-mawupeng1@huawei.com
>> Fixes: b1a86e15dc03 ("x86, pat: remove the dependency on 'vm_pgoff' in track/untrack pfn vma routines")
>> Fixes: 5899329b1910 ("x86: PAT: implement track/untrack of pfnmap regions for x86 - v3")
>
> These are really old. Should we backport this?
I was asking that question myself.
With the reproducer, the worst thing that happens on most systems is the
warning. On !RAM and with PAT, there could be memory leaks and other
surprises.
Likely, we should just backport it to stable. Should not be too hard to
backport to stable kernels I guess/hope.
--
Cheers,
David / dhildenb
Powered by blists - more mailing lists