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] [day] [month] [year] [list]
Date:   Wed, 26 Jun 2019 11:32:10 +0100
From:   Will Deacon <will@...nel.org>
To:     Ard Biesheuvel <ard.biesheuvel@...aro.org>
Cc:     Nathan Chancellor <natechancellor@...il.com>,
        Catalin Marinas <catalin.marinas@....com>,
        linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        clang-built-linux <clang-built-linux@...glegroups.com>,
        Fangrui Song <maskray@...gle.com>,
        Peter Smith <peter.smith@...aro.org>
Subject: Re: [PATCH] arm64/efi: Mark __efistub_stext_offset as an absolute
 symbol explicitly

On Wed, Jun 26, 2019 at 09:07:00AM +0200, Ard Biesheuvel wrote:
> On Wed, 26 Jun 2019 at 06:20, Nathan Chancellor
> <natechancellor@...il.com> wrote:
> >
> > After r363059 and r363928 in LLVM, a build using ld.lld as the linker
> > with CONFIG_RANDOMIZE_BASE enabled fails like so:
> >
> > ld.lld: error: relocation R_AARCH64_ABS32 cannot be used against symbol
> > __efistub_stext_offset; recompile with -fPIC
> >
> > Fangrui and Peter figured out that ld.lld is incorrectly considering
> > __efistub_stext_offset as a relative symbol because of the order in
> > which symbols are evaluated. _text is treated as an absolute symbol
> > and stext is a relative symbol, making __efistub_stext_offset a
> > relative symbol.
> >
> > Adding ABSOLUTE will force ld.lld to evalute this expression in the
> > right context and does not change ld.bfd's behavior. ld.lld will
> > need to be fixed but the developers do not see a quick or simple fix
> > without some research (see the linked issue for further explanation).
> > Add this simple workaround so that ld.lld can continue to link kernels.
> >
> > Link: https://github.com/ClangBuiltLinux/linux/issues/561
> > Link: https://github.com/llvm/llvm-project/commit/025a815d75d2356f2944136269aa5874721ec236
> > Link: https://github.com/llvm/llvm-project/commit/249fde85832c33f8b06c6b4ac65d1c4b96d23b83
> > Debugged-by: Fangrui Song <maskray@...gle.com>
> > Debugged-by: Peter Smith <peter.smith@...aro.org>
> > Suggested-by: Fangrui Song <maskray@...gle.com>
> > Signed-off-by: Nathan Chancellor <natechancellor@...il.com>
> 
> Acked-by: Ard Biesheuvel <ard.biesheuvel@...aro.org>

Thanks. I'll pick this up and add the link to the Clang issue as a comment
in the header.

Will

Powered by blists - more mailing lists