[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190320154501.GO112750@google.com>
Date: Wed, 20 Mar 2019 08:45:01 -0700
From: Matthias Kaehlcke <mka@...omium.org>
To: Masahiro Yamada <yamada.masahiro@...ionext.com>
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 Wed, Mar 20, 2019 at 10:55:06PM +0900, Masahiro Yamada wrote:
> 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/
Great, thanks!
> I do not know if this patch is still needed.
no, with the change to -Os the patch isn't needed anymore.
> 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.
Good to know, thanks for the pointer!
Powered by blists - more mailing lists