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:   Thu, 13 Dec 2018 00:05:23 +1100
From:   Michael Ellerman <mpe@...erman.id.au>
To:     Christophe Leroy <christophe.leroy@....fr>,
        Benjamin Herrenschmidt <benh@...nel.crashing.org>,
        Paul Mackerras <paulus@...ba.org>
Cc:     linux-kernel@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org
Subject: Re: [PATCH] powerpc/8xx: hide itlbie and dtlbie symbols

Christophe Leroy <christophe.leroy@....fr> writes:

> When disassembling InstructionTLBError we get the following messy code:
>
> c000138c:       7d 84 63 78     mr      r4,r12
> c0001390:       75 25 58 00     andis.  r5,r9,22528
> c0001394:       75 2a 40 00     andis.  r10,r9,16384
> c0001398:       41 a2 00 08     beq     c00013a0 <itlbie>
> c000139c:       7c 00 22 64     tlbie   r4,r0
>
> c00013a0 <itlbie>:
> c00013a0:       39 40 04 01     li      r10,1025
> c00013a4:       91 4b 00 b0     stw     r10,176(r11)
> c00013a8:       39 40 10 32     li      r10,4146
> c00013ac:       48 00 cc 59     bl      c000e004 <transfer_to_handler>
>
> For a cleaner code dump, this patch replaces itlbie and dtlbie
> symbols by numeric symbols.
>
> c000138c:       7d 84 63 78     mr      r4,r12
> c0001390:       75 25 58 00     andis.  r5,r9,22528
> c0001394:       75 2a 40 00     andis.  r10,r9,16384
> c0001398:       41 a2 00 08     beq     c00013a0 <InstructionTLBError+0xa0>
> c000139c:       7c 00 22 64     tlbie   r4,r0
> c00013a0:       39 40 04 01     li      r10,1025
> c00013a4:       91 4b 00 b0     stw     r10,176(r11)
> c00013a8:       39 40 10 32     li      r10,4146
> c00013ac:       48 00 cc 59     bl      c000e004 <transfer_to_handler>
> Signed-off-by: Christophe Leroy <christophe.leroy@....fr>
> ---
>  arch/powerpc/kernel/head_8xx.S | 14 ++++++--------
>  1 file changed, 6 insertions(+), 8 deletions(-)
>
> diff --git a/arch/powerpc/kernel/head_8xx.S b/arch/powerpc/kernel/head_8xx.S
> index 3b67b9533c82..8c848acfe249 100644
> --- a/arch/powerpc/kernel/head_8xx.S
> +++ b/arch/powerpc/kernel/head_8xx.S
> @@ -552,11 +552,10 @@ InstructionTLBError:
>  	mr	r4,r12
>  	andis.	r5,r9,DSISR_SRR1_MATCH_32S@h /* Filter relevant SRR1 bits */
>  	andis.	r10,r9,SRR1_ISI_NOPT@h
> -	beq+	1f
> +	beq+	1301f
>  	tlbie	r4
> -itlbie:
>  	/* 0x400 is InstructionAccess exception, needed by bad_page_fault() */
> -1:	EXC_XFER_LITE(0x400, handle_page_fault)
> +1301:	EXC_XFER_LITE(0x400, handle_page_fault)

You could use a local symbol, something like:

	beq+	1f
 	tlbie	r4
.Litlbie:
 	/* 0x400 is InstructionAccess exception, needed by bad_page_fault() */
1:	EXC_XFER_LITE(0x400, handle_page_fault)


cheers

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ