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]
Date:   Sat, 1 Feb 2020 17:27:33 +0100
From:   Christophe Leroy <christophe.leroy@....fr>
To:     Benjamin Herrenschmidt <benh@...nel.crashing.org>,
        Paul Mackerras <paulus@...ba.org>,
        Michael Ellerman <mpe@...erman.id.au>
Cc:     linuxppc-dev@...ts.ozlabs.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] powerpc/32s: Don't flush all TLBs when flushing one
 page



Le 01/02/2020 à 09:04, Christophe Leroy a écrit :
> When flushing any memory range, the flushing function
> flushes all TLBs.
> 
> When (start) and (end - 1) are in the same memory page,
> flush that page instead.
> 
> Signed-off-by: Christophe Leroy <christophe.leroy@....fr>

Reviewed-by: Segher Boessenkool <segher@...nel.crashing.org>

> ---
> v2: Reworked the test as the previous one was always false (end - start was PAGE_SIZE - 1 for a single page)
> ---
>   arch/powerpc/mm/book3s32/tlb.c | 7 +++++--
>   1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/powerpc/mm/book3s32/tlb.c b/arch/powerpc/mm/book3s32/tlb.c
> index 2fcd321040ff..724c0490fb17 100644
> --- a/arch/powerpc/mm/book3s32/tlb.c
> +++ b/arch/powerpc/mm/book3s32/tlb.c
> @@ -79,11 +79,14 @@ static void flush_range(struct mm_struct *mm, unsigned long start,
>   	int count;
>   	unsigned int ctx = mm->context.id;
>   
> +	start &= PAGE_MASK;
>   	if (!Hash) {
> -		_tlbia();
> +		if (end - start <= PAGE_SIZE)
> +			_tlbie(start);
> +		else
> +			_tlbia();
>   		return;
>   	}
> -	start &= PAGE_MASK;
>   	if (start >= end)
>   		return;
>   	end = (end - 1) | ~PAGE_MASK;
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ