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]
Date: Thu, 4 Jan 2024 14:40:13 +0000
From: Will Deacon <will@...nel.org>
To: Nadav Amit <nadav.amit@...adcom.com>
Cc: Jisheng Zhang <jszhang@...nel.org>,
	Aneesh Kumar K V <aneesh.kumar@...ux.ibm.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Nick Piggin <npiggin@...il.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Catalin Marinas <catalin.marinas@....com>,
	Paul Walmsley <paul.walmsley@...ive.com>,
	Palmer Dabbelt <palmer@...belt.com>,
	Albert Ou <aou@...s.berkeley.edu>, Arnd Bergmann <arnd@...db.de>,
	linux-arch@...r.kernel.org, linux-mm <linux-mm@...ck.org>,
	linux-arm-kernel@...ts.infradead.org,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	linux-riscv@...ts.infradead.org, Nadav Amit <namit@...are.com>,
	Andrea Arcangeli <aarcange@...hat.com>,
	Andy Lutomirski <luto@...nel.org>,
	Dave Hansen <dave.hansen@...ux.intel.com>,
	Thomas Gleixner <tglx@...utronix.de>, Yu Zhao <yuzhao@...gle.com>,
	the arch/x86 maintainers <x86@...nel.org>
Subject: Re: [PATCH 1/2] mm/tlb: fix fullmm semantics

On Thu, Jan 04, 2024 at 03:26:43PM +0200, Nadav Amit wrote:
> 
> 
> > On Jan 2, 2024, at 4:41 AM, Jisheng Zhang <jszhang@...nel.org> wrote:
> > 
> > On Sat, Dec 30, 2023 at 11:54:02AM +0200, Nadav Amit wrote:
> > 
> >> 
> >> My knowledge of arm64 is a bit limited, but the code does not seem
> >> to match the comment, so if it is correct (which I strongly doubt),
> >> the comment should be updated.
> > 
> > will do if the above change is accepted by arm64
> 
> Jisheng, I expected somebody with arm64 knowledge to point it out, and
> maybe I am wrong, but I really don’t understand something about the
> correctness, if you can please explain.
> 
> In the following code:
> 
> --- a/arch/arm64/include/asm/tlb.h
> +++ b/arch/arm64/include/asm/tlb.h
> @@ -62,7 +62,10 @@ static inline void tlb_flush(struct mmu_gather *tlb)
> 	 * invalidating the walk-cache, since the ASID allocator won't
> 	 * reallocate our ASID without invalidating the entire TLB.
> 	 */
> -	if (tlb->fullmm) {
> +	if (tlb->fullmm)
> +		return;
> 
> You skip flush if fullmm is on. But if page-tables are freed, you may
> want to flush immediately and not wait for ASID to be freed to avoid
> speculative page walks; these walks at least on x86 caused a mess.
> 
> No?

I think Catalin made the same observation here:

https://lore.kernel.org/r/ZZWh4c3ZUtadFqD1@arm.com

and it does indeed look broken.

Will

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ