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] [day] [month] [year] [list]
Message-ID: <b52726c7-ea9c-4743-a68d-3eafce4e5c61@arm.com>
Date: Mon, 24 Nov 2025 14:36:32 +0000
From: Ryan Roberts <ryan.roberts@....com>
To: Kevin Brodsky <kevin.brodsky@....com>, linux-mm@...ck.org
Cc: linux-kernel@...r.kernel.org, Alexander Gordeev <agordeev@...ux.ibm.com>,
 Andreas Larsson <andreas@...sler.com>,
 Andrew Morton <akpm@...ux-foundation.org>,
 Boris Ostrovsky <boris.ostrovsky@...cle.com>, Borislav Petkov
 <bp@...en8.de>, Catalin Marinas <catalin.marinas@....com>,
 Christophe Leroy <christophe.leroy@...roup.eu>,
 Dave Hansen <dave.hansen@...ux.intel.com>,
 David Hildenbrand <david@...hat.com>, "David S. Miller"
 <davem@...emloft.net>, David Woodhouse <dwmw2@...radead.org>,
 "H. Peter Anvin" <hpa@...or.com>, Ingo Molnar <mingo@...hat.com>,
 Jann Horn <jannh@...gle.com>, Juergen Gross <jgross@...e.com>,
 "Liam R. Howlett" <Liam.Howlett@...cle.com>,
 Lorenzo Stoakes <lorenzo.stoakes@...cle.com>,
 Madhavan Srinivasan <maddy@...ux.ibm.com>,
 Michael Ellerman <mpe@...erman.id.au>, Michal Hocko <mhocko@...e.com>,
 Mike Rapoport <rppt@...nel.org>, Nicholas Piggin <npiggin@...il.com>,
 Peter Zijlstra <peterz@...radead.org>, Suren Baghdasaryan
 <surenb@...gle.com>, Thomas Gleixner <tglx@...utronix.de>,
 Vlastimil Babka <vbabka@...e.cz>, Will Deacon <will@...nel.org>,
 Yeoreum Yun <yeoreum.yun@....com>, linux-arm-kernel@...ts.infradead.org,
 linuxppc-dev@...ts.ozlabs.org, sparclinux@...r.kernel.org,
 xen-devel@...ts.xenproject.org, x86@...nel.org
Subject: Re: [PATCH v4 06/12] mm: introduce generic lazy_mmu helpers

On 24/11/2025 12:47, Kevin Brodsky wrote:
> On 10/11/2025 11:45, Kevin Brodsky wrote:
>>>> diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c
>>>> index b8d37eb037fc..d9c8e94f140f 100644
>>>> --- a/arch/arm64/mm/mmu.c
>>>> +++ b/arch/arm64/mm/mmu.c
>>>> @@ -731,7 +731,7 @@ int split_kernel_leaf_mapping(unsigned long start, unsigned long end)
>>>>  		return -EINVAL;
>>>>  
>>>>  	mutex_lock(&pgtable_split_lock);
>>>> -	arch_enter_lazy_mmu_mode();
>>>> +	lazy_mmu_mode_enable();
>>>>  
>>>>  	/*
>>>>  	 * The split_kernel_leaf_mapping_locked() may sleep, it is not a
>>> This is a bit unfortunate, IMHO. The rest of this comment explains that although
>>> you're not supposed to sleep inside lazy mmu mode, it's fine for arm64's
>>> implementation. But we are no longer calling arm64's implementation; we are
>>> calling a generic function, which does who knows what.
>>>
>>> I think it all still works, but we are no longer containing our assumptions in
>>> arm64 code. We are relying on implementation details of generic code.
>> I see your point. The change itself is still correct (and required
>> considering patch 8), but maybe the documentation of the generic
>> interface should be clarified to guarantee that the generic layer can
>> itself cope with sleeping - without any guarantee regarding the
>> behaviour of arch_*_lazy_mmu_mode.
> 
> Re-reading the existing comment in <linux/pgtable.h>, I think it already
> makes clear that sleeping is not forbidden by design:
> 
>>  * In the general case, no lock is guaranteed to be held between entry
>> and exit
>>  * of the lazy mode. So the implementation must assume preemption may
>> be enabled
>>  * and cpu migration is possible; it must take steps to be robust
>> against this.
> 
> The arch implementation may disable preemption, but arm64 code can rely
> on the arm64 implementation allowing sleeping.

Yeah ok, I buy that!

> 
> - Kevin
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ