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:   Mon, 25 Apr 2022 19:40:22 +0200
From:   Arnd Bergmann <arnd@...db.de>
To:     "Jason A. Donenfeld" <Jason@...c4.com>
Cc:     Arnd Bergmann <arnd@...db.de>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Nick Desaulniers <ndesaulniers@...gle.com>
Subject: Re: odd endianness toolchains for crosstool

On Mon, Apr 25, 2022 at 7:01 PM Jason A. Donenfeld <Jason@...c4.com> wrote:
> On Mon, Apr 25, 2022 at 06:15:07PM +0200, Arnd Bergmann wrote:
> > On Mon, Apr 25, 2022 at 5:53 PM Jason A. Donenfeld <Jason@...c4.com> wrote:
> >
> > Ok, I see. For all I can tell, the toolchain I built already uses both
> > --with-long-double-64
> > and --enable-secureplt, as those seemt to be the default for Linux.
>
> For ppc32? I'm unable to produce working executables with the toolchain.
> And looking at the target info, -msecure-plt is missing, while
> -mlong-double-64 is there:
>
> $ ./powerpc-linux-gcc -Q --help=target | grep long-double
>   -mlong-double-                        64
> $ ./powerpc-linux-gcc -Q --help=target | grep msecure-plt
>   -msecure-plt                          [disabled]

Ah, my mistake, I looked at the distro provided compiler instead of my own :(

> For ppc64, I see the same. I'll try to look into it more though.
>
> > Regarding the the ELF ABI, I'm not sure how to check, but I think it
> > only does ELFv1, which is the default for big-endian glibc.
>
> Yes, it only is doing ELFv1 right now. musl checks this in
> <https://git.musl-libc.org/cgit/musl/tree/configure#n689> with this:
>
>     trycppif "_CALL_ELF == 2" "$t" || fail "$0: error: unsupported powerpc64 ABI"

Does it work if you pass -mabi=elfv2? This seems to be ignored here as well:

$ powerpc-linux-gcc  -mlittle-endian -mabi=elfv2 -xc -c /dev/null  -o /tmp/a.o
$ file /tmp/a.o
/tmp/a.o: ELF 32-bit LSB relocatable, PowerPC or cisco 4500, version 1
(SYSV), not stripped

        Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ