Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp588243img; Wed, 20 Mar 2019 06:58:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqy3Txs4h7Hfu/vM6c+3pCNmr4xYAuK2+00y2UcieL8KFVraBWdy8bx21pySxksOkUck9rcq X-Received: by 2002:a62:4649:: with SMTP id t70mr8064744pfa.100.1553090310538; Wed, 20 Mar 2019 06:58:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553090310; cv=none; d=google.com; s=arc-20160816; b=snpc0Ux47AQyUJZ11QgpaoWnIFzyAZKrg+cWgOihSDAqlXtk8R97aZjlhXZZAxAeNR ZZoD6OAYCu+2fZde+YNHSr9fJcXBZPno3LrmPW4qDYTVrC96RaNd/Lpm82ZDYE3x8c4z x6veWrOqiZgdENIh/5lXmu2Exu5FXM5lqZvmEiBAhHmNW8ZMMv+yoAAKkARHLr1Apd+9 LNoRHMcyzwfqlru8YEyPAtd7TsxCl3RC51PDUsM3O9oNxdZ58WXRqYAkuHZOJoC8F0hw 6BmVeU3IFaA/xyGWqhed8HjhkIh7lUg9HYuV9GyHHUlvRCtBU50DylV1tvEdJkyl529D klJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature:dkim-filter; bh=hiiGyh7YSFui/vJJXdCRF4SiqT/SlOJQDxwe8vaqJyE=; b=ASB0TYGYKsNPsG7TU2Cs6tTj0Cv57vGkHeAw5NsGWrnMBeOPf0gXVdgv7gkTgbYH0w 5lBTsXfoYuFo3hWr4iHboNhB7rAJvZR1DuBwcdEzIWK4+Fjtl+ToxTEPfTmMGn0gFinS OZH9AE7UyGE208Jf2OBTPlkjTal2FSBQu6xpZi1u1ASgt1OggNvnRa625LExbGSsUO4z St8WQoOKX+yY6xietukeW6sFGbLPq1c5byxr7ewQEAbeZdirtkLJZ1AhOS+L8rRODbV0 LnZfi3Spt25nvmnWiPuzhE3PIjg6qGTLMnbSsnXjWx6gMpBJFQ/i16HVYVh7uqDbyFCw SIKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=fhmK4rN4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j3si1611361pfi.279.2019.03.20.06.58.14; Wed, 20 Mar 2019 06:58:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=fhmK4rN4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727893AbfCTNzv (ORCPT + 99 others); Wed, 20 Mar 2019 09:55:51 -0400 Received: from conssluserg-03.nifty.com ([210.131.2.82]:50353 "EHLO conssluserg-03.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726303AbfCTNzv (ORCPT ); Wed, 20 Mar 2019 09:55:51 -0400 Received: from mail-vs1-f44.google.com (mail-vs1-f44.google.com [209.85.217.44]) (authenticated) by conssluserg-03.nifty.com with ESMTP id x2KDtgAS020630 for ; Wed, 20 Mar 2019 22:55:43 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-03.nifty.com x2KDtgAS020630 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1553090143; bh=hiiGyh7YSFui/vJJXdCRF4SiqT/SlOJQDxwe8vaqJyE=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=fhmK4rN4zlHQmTZERE7VFrmW+dQfjiCgVCjGfPPTBtmyceN7deqR0YEuQQ04iexcS rXUhCUla45YYE2Y8i1PRtzk3MP0bL1tXamBWji6hyoH2JO2IpD39Wr/bKzA/tvNZiE DjUWuE8IQBrT7jDKapX0aHaAe8W6/0kDZfJGc41prqchL1eeUVlrdX8CKNtGI/l0d4 /MiMughaMmm3V/2l+pSgWzr0SR2eh1hb+E2ltLaO47X5s+tUF+2jiW0xxyYJ8v7ucu 51qqAsoHC2mixGk2P/EoPJGtKNL+cJ3re+oWRqZpfCv5EnQeMBTJX+DqXAjI6J+to2 0LVX1vVo1E9PQ== X-Nifty-SrcIP: [209.85.217.44] Received: by mail-vs1-f44.google.com with SMTP id w13so1526185vsc.4 for ; Wed, 20 Mar 2019 06:55:43 -0700 (PDT) X-Gm-Message-State: APjAAAXceKdAl011NoN81mgK0QkZcTLIoksFq89yJjgAF9Bpby3k3Mxa 80Ld37bhwSlC6z15zw28/STFZGnu5meIx+ax1xc= X-Received: by 2002:a67:ea05:: with SMTP id g5mr4891528vso.179.1553090142407; Wed, 20 Mar 2019 06:55:42 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Masahiro Yamada Date: Wed, 20 Mar 2019 22:55:06 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] x86/vdso: include generic __lshrdi3 in 32-bit vDSO To: Matthias Kaehlcke Cc: Andy Lutomirski , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H . Peter Anvin" , X86 ML , Linux Kernel Mailing List , Nick Desaulniers , Manoj Gupta , Tiancong Wang , Stephen Hines , clang-built-linux@googlegroups.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Mar 16, 2019 at 4:55 AM Matthias Kaehlcke 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 > --- > 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 > +#include > #include > > 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