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:   Wed, 20 Mar 2019 22:55:06 +0900
From:   Masahiro Yamada <yamada.masahiro@...ionext.com>
To:     Matthias Kaehlcke <mka@...omium.org>
Cc:     Andy Lutomirski <luto@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        "H . Peter Anvin" <hpa@...or.com>, X86 ML <x86@...nel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Manoj Gupta <manojgupta@...omium.org>,
        Tiancong Wang <tcwang@...omium.org>,
        Stephen Hines <srhines@...gle.com>,
        clang-built-linux@...glegroups.com
Subject: Re: [PATCH] x86/vdso: include generic __lshrdi3 in 32-bit vDSO

On Sat, Mar 16, 2019 at 4:55 AM Matthias Kaehlcke <mka@...omium.org> wrote:
>
> Building the 32-bit vDSO with a recent clang version fails due
> to undefined symbols:
>
> arch/x86/entry/vdso/vdso32.so.dbg: undefined symbols found
>
> The undefined symbol in this case is __lshrdi3, which is part of
> the compiler runtime library, however the vDSO isn't linked against
> this library.
>
> Include the kernel version of __lshrdi3 in the 32-bit vDSO build.
>
> Signed-off-by: Matthias Kaehlcke <mka@...omium.org>
> ---
> diff --git a/lib/lshrdi3.c b/lib/lshrdi3.c
> index 99cfa5721f2d..8a4fc6bcf3a4 100644
> --- a/lib/lshrdi3.c
> +++ b/lib/lshrdi3.c
> @@ -16,7 +16,7 @@
>   * to the Free Software Foundation, Inc.
>   */
>
> -#include <linux/module.h>
> +#include <linux/export.h>
>  #include <linux/libgcc.h>
>
>  long long notrace __lshrdi3(long long u, word_type b)
> @@ -42,4 +42,6 @@ long long notrace __lshrdi3(long long u, word_type b)
>
>         return w.ll;
>  }
> +#ifndef BUILD_VDSO
>  EXPORT_SYMBOL(__lshrdi3);
> +#endif


I picked up
https://patchwork.kernel.org/patch/10858565/



I do not know if this patch is still needed.

FYI, just a tip to turn EXPORT_SYMBOL into no-op cleanly.

You can use __DISABLE_EXPORTS
as drivers/firmware/efi/libstub/Makefile does.

See commit f922c4abdf76.


-- 
Best Regards
Masahiro Yamada

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ