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: <ed0628ba-494d-43a6-8436-55f2ffc0f2c5@arm.com>
Date: Thu, 22 May 2025 17:15:21 +0530
From: Dev Jain <dev.jain@....com>
To: catalin.marinas@....com, will@...nel.org
Cc: linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
 mark.rutland@....com, anshuman.khandual@....com,
 yang@...amperecomputing.com, wangkefeng.wang@...wei.com,
 yangyicong@...ilicon.com, baohua@...nel.org, pjaroszynski@...dia.com,
 ardb@...nel.org, david@...hat.com, Ryan Roberts <ryan.roberts@....com>
Subject: Re: [RFC PATCH] arm64: Elide dsb in kernel TLB invalidations

Forgot to add Ryan.

On 22/05/25 5:14 pm, Dev Jain wrote:
> dsb(ishst) is used to ensure that prior pagetable updates are completed.
> But, set_pmd/set_pud etc already issue a dsb-isb sequence for the exact
> same purpose. Therefore, we can elide the dsb in kernel tlb invalidation.
>
> There were no issues observed while running mm selftests, including
> test_vmalloc.sh selftest to stress the vmalloc subsystem.
>
> Signed-off-by: Dev Jain <dev.jain@....com>
> ---
>   arch/arm64/include/asm/tlbflush.h | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm64/include/asm/tlbflush.h b/arch/arm64/include/asm/tlbflush.h
> index eba1a98657f1..9b4adf1ee45e 100644
> --- a/arch/arm64/include/asm/tlbflush.h
> +++ b/arch/arm64/include/asm/tlbflush.h
> @@ -508,7 +508,7 @@ static inline void flush_tlb_kernel_range(unsigned long start, unsigned long end
>   		return;
>   	}
>   
> -	dsb(ishst);
> +	/* dsb(ishst) not needed as callers (set_pxd) have that */
>   	__flush_tlb_range_op(vaale1is, start, pages, stride, 0,
>   			     TLBI_TTL_UNKNOWN, false, lpa2_is_enabled());
>   	dsb(ish);
> @@ -523,7 +523,7 @@ static inline void __flush_tlb_kernel_pgtable(unsigned long kaddr)
>   {
>   	unsigned long addr = __TLBI_VADDR(kaddr, 0);
>   
> -	dsb(ishst);
> +	/* dsb(ishst) not needed as callers (set_pxd) have that */
>   	__tlbi(vaae1is, addr);
>   	dsb(ish);
>   	isb();

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ