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: <n5sr2s9o-3n53-91q0-noo6-o576n6o36253@syhkavp.arg>
Date:   Thu, 3 Dec 2020 11:27:13 -0500 (EST)
From:   Nicolas Pitre <nico@...xnic.net>
To:     Geert Uytterhoeven <geert+renesas@...der.be>
cc:     Russell King <linux@...linux.org.uk>,
        Ard Biesheuvel <ardb@...nel.org>,
        Marek Szyprowski <m.szyprowski@...sung.com>,
        Dmitry Osipenko <digetx@...il.com>,
        Linus Walleij <linus.walleij@...aro.org>,
        Arnd Bergmann <arnd@...db.de>,
        Eric Miao <eric.miao@...dia.com>,
        Uwe Kleine-König 
        <u.kleine-koenig@...gutronix.de>,
        Lukasz Stelmach <l.stelmach@...sung.com>,
        Stephen Boyd <sboyd@...nel.org>,
        Chris Brandt <chris.brandt@...esas.com>,
        linux-arm-kernel@...ts.infradead.org,
        linux-renesas-soc@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v10 2/3] ARM: uncompress: Add OF_DT_MAGIC macro

On Thu, 3 Dec 2020, Geert Uytterhoeven wrote:

> The DTB magic marker is stored as a 32-bit big-endian value, and thus
> depends on the CPU's endianness.  Add a macro to define this value in
> native endianness, to reduce #ifdef clutter and (future) duplication.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@...der.be>

Reviewed-by: Nicolas Pitre <nico@...xnic.net>


> ---
> v10:
>   - New.
> ---
>  arch/arm/boot/compressed/head.S | 12 +++++++-----
>  1 file changed, 7 insertions(+), 5 deletions(-)
> 
> diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S
> index aabdc544c03aafdc..d9cce7238a365081 100644
> --- a/arch/arm/boot/compressed/head.S
> +++ b/arch/arm/boot/compressed/head.S
> @@ -11,6 +11,12 @@
>  
>  #include "efi-header.S"
>  
> +#ifdef __ARMEB__
> +#define OF_DT_MAGIC 0xd00dfeed
> +#else
> +#define OF_DT_MAGIC 0xedfe0dd0
> +#endif
> +
>   AR_CLASS(	.arch	armv7-a	)
>   M_CLASS(	.arch	armv7-m	)
>  
> @@ -335,11 +341,7 @@ restart:	adr	r0, LC1
>   */
>  
>  		ldr	lr, [r6, #0]
> -#ifndef __ARMEB__
> -		ldr	r1, =0xedfe0dd0		@ sig is 0xd00dfeed big endian
> -#else
> -		ldr	r1, =0xd00dfeed
> -#endif
> +		ldr	r1, =OF_DT_MAGIC
>  		cmp	lr, r1
>  		bne	dtb_check_done		@ not found
>  
> -- 
> 2.25.1
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ