lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2cb4503d-3a3f-4f6c-8038-7b3d1c74b3c2@kernel.org>
Date: Thu, 5 Feb 2026 22:30:14 +0100
From: "David Hildenbrand (Arm)" <david@...nel.org>
To: Matthew Wilcox <willy@...radead.org>, Lance Yang <lance.yang@...ux.dev>
Cc: Dave Hansen <dave.hansen@...el.com>, Peter Zijlstra
 <peterz@...radead.org>, Liam.Howlett@...cle.com, akpm@...ux-foundation.org,
 aneesh.kumar@...nel.org, arnd@...db.de, baohua@...nel.org,
 baolin.wang@...ux.alibaba.com, boris.ostrovsky@...cle.com, bp@...en8.de,
 dave.hansen@...ux.intel.com, dev.jain@....com, hpa@...or.com,
 hughd@...gle.com, ioworker0@...il.com, jannh@...gle.com, jgross@...e.com,
 kvm@...r.kernel.org, linux-arch@...r.kernel.org,
 linux-kernel@...r.kernel.org, linux-mm@...ck.org,
 lorenzo.stoakes@...cle.com, mingo@...hat.com, npache@...hat.com,
 npiggin@...il.com, pbonzini@...hat.com, riel@...riel.com,
 ryan.roberts@....com, seanjc@...gle.com, shy828301@...il.com,
 tglx@...utronix.de, virtualization@...ts.linux.dev, will@...nel.org,
 x86@...nel.org, ypodemsk@...hat.com, ziy@...dia.com
Subject: Re: [PATCH v4 0/3] targeted TLB sync IPIs for lockless page table

On 2/5/26 18:06, David Hildenbrand (Arm) wrote:
> On 2/5/26 17:48, Matthew Wilcox wrote:
>> On Fri, Feb 06, 2026 at 12:30:56AM +0800, Lance Yang wrote:
>>>
>>> The issue is we're about to free the page table (e.g.
>>> pmdp_collapse_flush()).
>>>
>>> We have to ensure no walker is still doing a lockless page-table walk
>>> when the page directories are freed, otherwise we get use-after-free.
>>
>> But can't we RCU-free the page table?  Why do we need to wait for the
>> RCU readers to finish?
> 
> For unsharing hugetlb PMD tables the problem is not the freeing but the 
> reuse of the PMD table for other purposes in the last remaining user. 
> It's complicated.
> 
> For page table freeing, we only do it if we fail to allocate memory -- 
> if we cannot use RCU IIRC.
> 
> khugepaged, no idea.

Now that I had dinner my memory comes back: for khugepaged, we have to 
make sure there is no concurrent GUP-fast before collapsing and 
(possibly) freeing the page table / re-depositing it.

-- 
Cheers,

David

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ