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:   Tue, 2 Feb 2021 21:43:31 +0100
From:   Arnd Bergmann <arnd@...nel.org>
To:     Nathan Chancellor <nathan@...nel.org>
Cc:     Catalin Marinas <catalin.marinas@....com>,
        Will Deacon <will@...nel.org>,
        Linux ARM <linux-arm-kernel@...ts.infradead.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        clang-built-linux <clang-built-linux@...glegroups.com>,
        Arnd Bergmann <arnd@...db.de>,
        Peter Smith <Peter.Smith@....com>
Subject: Re: [PATCH] arm64: Make CPU_BIG_ENDIAN depend on !LD_IS_LLD

On Tue, Feb 2, 2021 at 8:51 PM Nathan Chancellor <nathan@...nel.org> wrote:
> On Tue, Feb 02, 2021 at 09:04:34AM +0100, Arnd Bergmann wrote:
> > On Tue, Feb 2, 2021 at 3:25 AM Nathan Chancellor <nathan@...nel.org> wrote:
> > >
> > > Similar to commit 28187dc8ebd9 ("ARM: 9025/1: Kconfig: CPU_BIG_ENDIAN
> > > depends on !LD_IS_LLD"), ld.lld does not support aarch64 big endian,
> > > leading to the following build error when CONFIG_CPU_BIG_ENDIAN is
> > > selected:
> > >
> > > ld.lld: error: unknown emulation: aarch64linuxb
> >
> > While this is the original error message I reported, I think it would be
> > better to explain that lld actually does support linking big-endian
> > kernels but they don't boot, for unknown reasons.
>
> That statement seems to contradict what Peter Smith says:
>
> https://github.com/ClangBuiltLinux/linux/issues/1288#issuecomment-770693582
>
> https://reviews.llvm.org/D58655#1410282

Right, adding Peter to Cc for clarification. Peter, what I can tell from
experiments is that lld behaves just you describe it should, and (aside from
the command like flag handling) like ld.bfd, so I'm not sure if there are
any known deficiencies or just minor bugs when dealing with the kernel.

FWIW, I have now built a big-endian musl C library and a helloworld
binary, which I linked with ld.lld and successfully tested using
qemu-aarch64_be-static

      Arnd

> > I can send a patch to address the build error and mark big-endian
> > as "depends on !LD_IS_LLD || COMPILE_TEST" to reflect that
> > and help with randconfig testing.
>
> I have no strong opinion on handling this though.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ