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: <99237729-f2b0-4a7a-8213-65a2f1c57744@linux.dev>
Date: Fri, 6 Feb 2026 00:30:56 +0800
From: Lance Yang <lance.yang@...ux.dev>
To: Dave Hansen <dave.hansen@...el.com>,
 "David Hildenbrand (Arm)" <david@...nel.org>,
 Peter Zijlstra <peterz@...radead.org>
Cc: 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 2026/2/5 23:41, Dave Hansen wrote:
> On 2/5/26 07:31, Lance Yang wrote:
>> On 2026/2/5 23:09, Dave Hansen wrote:
>>> On 2/5/26 07:01, Lance Yang wrote:
>>>> So for now, neither approach looks good: tracking on the read side adss
>>>> cost to GUP-fast, and syncing on the write side e.g. synchronize_rcu()
>>>> is too slow on large systems.
>>>
>>> Which of the writers truly *need* synchronize_rcu()?
>>>
>>> What are they doing with the memory that they can't move forward unless
>>> it's quiescent *now*?
>>
>> Without IPIs or synchronize_rcu(), IIUC, we have no way to know if there
>> are ongoing concurrent lockless page-table walks — the walkers just disable
>> IRQs and walk.
> 
> Yeah, but one aim of RCU is ensuring that readers see valid data but not
> necessarily the most up to date data.
> 
> Are there cases where ongoing concurrent lockless page-table walks need
> to see the writes and they can't tolerate seeing valid but slightly
> stale data?

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.

> Don't forget that we also have pesky concurrent lockless page-table
> walkers called CPUs. They're extra pesky in that they don't even stop
> for IPIs. ;)

I assume those walkers that don't disable IRQs only read the PMD and
don't walk into the table; otherwise the current sync wouldn't work
for them.

Thanks,
Lance

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ