All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthias Kaehlcke <mka@chromium.org>
To: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Andy Lutomirski <luto@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	"H . Peter Anvin" <hpa@zytor.com>, X86 ML <x86@kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Nick Desaulniers <ndesaulniers@google.com>,
	Manoj Gupta <manojgupta@chromium.org>,
	Tiancong Wang <tcwang@chromium.org>,
	Stephen Hines <srhines@google.com>,
	clang-built-linux@googlegroups.com
Subject: Re: [PATCH] x86/vdso: include generic __lshrdi3 in 32-bit vDSO
Date: Wed, 20 Mar 2019 08:45:01 -0700	[thread overview]
Message-ID: <20190320154501.GO112750@google.com> (raw)
In-Reply-To: <CAK7LNASv1BybFUDZ0KippC216i4k51iX42DL-HCHHxZWM2oz+A@mail.gmail.com>

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@chromium.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@chromium.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!

      reply	other threads:[~2019-03-20 15:45 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-15 19:54 [PATCH] x86/vdso: include generic __lshrdi3 in 32-bit vDSO Matthias Kaehlcke
2019-03-15 21:31 ` Nick Desaulniers
2019-03-15 22:29   ` Matthias Kaehlcke
2019-03-15 23:18     ` hpa
2019-03-18  8:59       ` Peter Zijlstra
2019-03-18 17:09     ` Nick Desaulniers
2019-03-18 17:16       ` Peter Zijlstra
2019-03-18 20:44         ` Matthias Kaehlcke
2019-03-18 23:03           ` Peter Zijlstra
2019-03-20 14:06   ` Masahiro Yamada
2019-03-20 13:55 ` Masahiro Yamada
2019-03-20 15:45   ` Matthias Kaehlcke [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190320154501.GO112750@google.com \
    --to=mka@chromium.org \
    --cc=bp@alien8.de \
    --cc=clang-built-linux@googlegroups.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=manojgupta@chromium.org \
    --cc=mingo@redhat.com \
    --cc=ndesaulniers@google.com \
    --cc=srhines@google.com \
    --cc=tcwang@chromium.org \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    --cc=yamada.masahiro@socionext.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.