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: <79a48288-509a-40e3-ba89-24b6f713117e@www.fastmail.com>
Date:   Wed, 06 Jan 2021 10:04:24 +0800
From:   "Jiaxun Yang" <jiaxun.yang@...goat.com>
To:     "Jinyang He" <hejinyang@...ngson.cn>,
        "Thomas Bogendoerfer" <tsbogend@...ha.franken.de>
Cc:     "linux-mips@...r.kernel.org" <linux-mips@...r.kernel.org>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] MIPS: zboot: Avoid endless loop in clear BSS.



On Wed, Jan 6, 2021, at 8:47 AM, Jinyang He wrote:
> Commit 2ee1503e546f ("MIPS: zboot: head.S clean up").
> 
> After .noreorder removed, clear BSS fall into endless loop. The bne
> instruction will add nop to the delay slot at compile time. So a0
> register will not increment by 4. Fix it and clear BSS from _edata
> to (_end - 1).

Oops, my fault.
My QEMU based local test setup somehow never really tested zboot.

Reviewed-by: Jiaxun Yang <jiaxun.yang@...goat.com>

Thanks!

- Jiaxun

> 
> Signed-off-by: Jinyang He <hejinyang@...ngson.cn>
> ---
>  arch/mips/boot/compressed/head.S | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/mips/boot/compressed/head.S b/arch/mips/boot/compressed/head.S
> index 070b2fb..5795d0a 100644
> --- a/arch/mips/boot/compressed/head.S
> +++ b/arch/mips/boot/compressed/head.S
> @@ -26,8 +26,8 @@
>  	PTR_LA	a0, _edata
>  	PTR_LA	a2, _end
>  1:	sw	zero, 0(a0)
> +	addiu	a0, a0, 4
>  	bne	a2, a0, 1b
> -	 addiu	a0, a0, 4
>  
>  	PTR_LA	a0, (.heap)	     /* heap address */
>  	PTR_LA	sp, (.stack + 8192)  /* stack address */
> -- 
> 2.1.0
> 
>

-- 
- Jiaxun

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ