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 Dec 2020 11:45:35 +0800
From:   Jiaxun Yang <jiaxun.yang@...goat.com>
To:     linux-mips@...r.kernel.org
Cc:     Paul Cercueil <paul@...pouillou.net>,
        Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] MIPS: zboot: head.S clean up

在 2020/12/30 上午11:08, Jiaxun Yang 写道:
> .cprestore is removed as we don't expect Position Independent
> zboot ELF.
>
> .noreorder is also removed and rest instructions are massaged
> to improve readability.
>
> t9 register is used for indirect jump as MIPS ABI requirement.
>
> start label is removed as it already defined in LEAF.
>
> Reported-by: Paul Cercueil <paul@...pouillou.net>
> Signed-off-by: Jiaxun Yang <jiaxun.yang@...goat.com>
>
> --
> v2: Remove start label (paul)
> ---
>   arch/mips/boot/compressed/head.S | 17 +++++++----------
>   1 file changed, 7 insertions(+), 10 deletions(-)
>
> diff --git a/arch/mips/boot/compressed/head.S b/arch/mips/boot/compressed/head.S
> index 409cb483a9ff..977218c90bc8 100644
> --- a/arch/mips/boot/compressed/head.S
> +++ b/arch/mips/boot/compressed/head.S
> @@ -15,8 +15,6 @@
>   #include <asm/asm.h>
>   #include <asm/regdef.h>
>   
> -	.set noreorder
> -	.cprestore
>   	LEAF(start)
>   start:

Oops, it's still here, sorry for the noise.

Thanks

- Jiaxun

>   	/* Save boot rom start args */
> @@ -35,21 +33,20 @@ start:
>   	PTR_LA	a0, (.heap)	     /* heap address */
>   	PTR_LA	sp, (.stack + 8192)  /* stack address */
>   
> -	PTR_LA	ra, 2f
> -	PTR_LA	k0, decompress_kernel
> -	jr	k0
> -	 nop
> +	PTR_LA	t9, decompress_kernel
> +	jalr	t9
> +
>   2:
>   	move	a0, s0
>   	move	a1, s1
>   	move	a2, s2
>   	move	a3, s3
> -	PTR_LI	k0, KERNEL_ENTRY
> -	jr	k0
> -	 nop
> +	PTR_LI	t9, KERNEL_ENTRY
> +	jalr	t9
> +
>   3:
>   	b	3b
> -	 nop
> +
>   	END(start)
>   
>   	.comm .heap,BOOT_HEAP_SIZE,4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ