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:   Wed, 30 Jan 2019 09:08: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>,
        Nicholas Piggin <npiggin@...il.com>,
        Mike Rapoport <rppt@...ux.ibm.com>
Cc:     Mark Rutland <mark.rutland@....com>, linuxppc-dev@...ts.ozlabs.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v14 01/12] powerpc/32: Fix
 CONFIG_VIRT_CPU_ACCOUNTING_NATIVE for 40x/booke



Le 24/01/2019 à 17:19, Christophe Leroy a écrit :
> 40x/booke have another path to reach 3f from transfer_to_handler,
> so ACCOUNT_CPU_USER_ENTRY() have to be moved there.
> 
> Signed-off-by: Christophe Leroy <christophe.leroy@....fr>

Now ACCOUNT_CPU_USER_ENTRY() is also in the non-user entry path.

This change is crazy, please ignore it :-S

Christophe

> ---
>   arch/powerpc/kernel/entry_32.S | 13 ++++++-------
>   1 file changed, 6 insertions(+), 7 deletions(-)
> 
> diff --git a/arch/powerpc/kernel/entry_32.S b/arch/powerpc/kernel/entry_32.S
> index 0768dfd8a64e..0165edd03b38 100644
> --- a/arch/powerpc/kernel/entry_32.S
> +++ b/arch/powerpc/kernel/entry_32.S
> @@ -185,12 +185,6 @@ transfer_to_handler:
>   	addi	r12,r12,-1
>   	stw	r12,4(r11)
>   #endif
> -#ifdef CONFIG_VIRT_CPU_ACCOUNTING_NATIVE
> -	CURRENT_THREAD_INFO(r9, r1)
> -	tophys(r9, r9)
> -	ACCOUNT_CPU_USER_ENTRY(r9, r11, r12)
> -#endif
> -
>   	b	3f
>   
>   2:	/* if from kernel, check interrupted DOZE/NAP mode and
> @@ -208,9 +202,14 @@ transfer_to_handler:
>   	bt-	31-TLF_NAPPING,4f
>   	bt-	31-TLF_SLEEPING,7f
>   #endif /* CONFIG_PPC_BOOK3S_32 || CONFIG_E500 */
> +3:
> +#ifdef CONFIG_VIRT_CPU_ACCOUNTING_NATIVE
> +	CURRENT_THREAD_INFO(r9, r1)
> +	tophys(r9, r9)
> +	ACCOUNT_CPU_USER_ENTRY(r9, r11, r12)
> +#endif
>   	.globl transfer_to_handler_cont
>   transfer_to_handler_cont:
> -3:
>   	mflr	r9
>   	lwz	r11,0(r9)		/* virtual address of handler */
>   	lwz	r9,4(r9)		/* where to go when done */
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ