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: <CAMuHMdX1aCJPASd0vvuo+=sjnS8dv24eB_xY8Fn0L2TkJ8NWiQ@mail.gmail.com>
Date:   Thu, 3 Jun 2021 09:54:00 +0200
From:   Geert Uytterhoeven <geert@...ux-m68k.org>
To:     Randy Dunlap <rdunlap@...radead.org>
Cc:     Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Yoshinori Sato <ysato@...rs.sourceforge.jp>,
        Rich Felker <dalias@...c.org>,
        Linux-sh list <linux-sh@...r.kernel.org>
Subject: Re: [RFC PATCH 3/4] sh: define __BIG_ENDIAN for math-emu

Hi Randy,

On Thu, Jun 3, 2021 at 1:17 AM Randy Dunlap <rdunlap@...radead.org> wrote:
> The headers in include/math-emu/ test for __BYTE_ORDER == __BIG_ENDIAN
> without checking to see if these macros are defined, so add
> a define for __BIG_ENDIAN before pulling in these headers.
>
> This placates these build warnings:
>
> In file included from ../arch/sh/math-emu/math.c:23:
> ../include/math-emu/single.h:50:21: warning: "__BIG_ENDIAN" is not defined, evaluates to 0 [-Wundef]
>    50 | #if __BYTE_ORDER == __BIG_ENDIAN
> In file included from ../arch/sh/math-emu/math.c:24:
> ../include/math-emu/double.h:59:21: warning: "__BIG_ENDIAN" is not defined, evaluates to 0 [-Wundef]
>    59 | #if __BYTE_ORDER == __BIG_ENDIAN
>
> Fixes: 4b565680d163 ("sh: math-emu support")
> Signed-off-by: Randy Dunlap <rdunlap@...radead.org>

Thanks for your patch!

> --- linux-next-20210528.orig/arch/sh/math-emu/sfp-util.h
> +++ linux-next-20210528/arch/sh/math-emu/sfp-util.h
> @@ -70,4 +70,4 @@
>
>  #define __BYTE_ORDER __LITTLE_ENDIAN
>
> -
> +#define __BIG_ENDIAN 0

I don't think this is the right fix.

I think the right values should be picked up from:

    include/uapi/linux/byteorder/big_endian.h:#define __BIG_ENDIAN 4321
    include/uapi/linux/byteorder/little_endian.h:#define __LITTLE_ENDIAN 1234

How is this picked up on other architectures using <math-emu/single.h>?

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ