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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZtCZF_yaHnECJyZ1@zx2c4.com>
Date: Thu, 29 Aug 2024 17:51:51 +0200
From: "Jason A. Donenfeld" <Jason@...c4.com>
To: arnd@...db.de, linux-kernel@...r.kernel.org
Subject: Re: odd endianness toolchains for crosstool

Hey Arnd,

On Mon, Apr 25, 2022 at 03:39:27AM +0200, Jason A. Donenfeld wrote:
> Hey Arnd,
> 
> I'm again experimenting with switching to your crosstool toolchains for
> WireGuard's CI. I've hit a few snags in the process:
> 
> - For powerpc, gcc needs to be built with `--enable-secureplt
>   --with-long-double-64` in order for musl to run.
> - Need powerpc64le compiler (-mabi=elfv2).
> - Need mipsel compiler.
> - Need aarch64_be compiler.
> - Need armeb compiler.
> - Need mips64el compiler.
> 
> While the existing compilers can all produce code for the wrong endian,
> they hit trouble when trying to link against libgcc. So generally a
> separate full toolchain is supplied for the less common endians.
> 
> I have had success with arm, arm64, mips, x86_64, i386, m68k. If you're
> up for adding the above compilers to the collection, I'd be able to
> complete the transition, and then look into adding a few more
> architectures.
> 
> Jason

I decided to give it another look, seeing if I could replace my musl.cc
compilers with your crosstool ones.

The actual changes required weren't so bad:

    https://git.zx2c4.com/wireguard-linux/commit/?h=update-toolchain

But there's not universal success:

    x86_64 - good
    i386 - good
    arm - good
    armeb - MISSING
    aarch64 - good
    aarch64_be - MISSING
    mips - BROKEN (doesn't like -EB)
    mipsel - MISSING
    mips64 - BROKEN (doesn't like -EB)
    mips64el - MISSING
    powerpc64 - BROKEN (wrong powerpc ABI)
    powerpc64le - MISSING
    powerpc - BROKEN (builds but some binaries segfault)
    m68k - good
    riscv64 - good
    riscv32 - good
    s390 - BROKEN (should be called "s390x" instead)
    um - kinda broken (but not crosstool's problem)

To try these, I've been running:

    ARCH=aarch64 make -C tools/testing/selftests/wireguard/qemu -j$(nproc)

or similar, against this tree:

    $ git clone -b update-toolchain https://git.zx2c4.com/wireguard-linux/

So it looks like it's not quite there, but not bad either. Just FYI in
case you're interested.

Jason

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ