Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp7242629ybi; Wed, 5 Jun 2019 13:51:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqyDKV1wDPAcwFp0j2XK1RJcVqikGd2oIWbbFe2t7UPfqutBpCYm3YUYnRoXoOpN/6QpbJoc X-Received: by 2002:a17:902:860c:: with SMTP id f12mr46778082plo.127.1559767879267; Wed, 05 Jun 2019 13:51:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559767879; cv=none; d=google.com; s=arc-20160816; b=v3c7/mCWukcdP/kh8v9nrK6PolQkpyLnzdrQlShjSuk92yZZS0U3zwDmhXWTKLnTMW rJhwdxWGf5ahzfvGD2aw2Ao896bYLYHxAfOd72Sjua1TyQkpnF3cJZmaCLOA9IgvbX7Z pjCUy8z21rBFb5mdZOtHTakpFzZAi11j6SwBK8NRLjivI3ZIGCNta7CIsox3qS5AhjTr XVfo+QTcoQ71VuNloS6qChWdWwvFBir0A9jobF3/VRd1IKDQrtEsWR695gsgeCnf7boF khk01wh0bezLAgB6K9ZTsr3qnvwnjTBwJ7ta2ve+mhFuA7hZ0azls5xaWB0n6taTWn98 naWQ== 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; bh=Gf36/FJbmvcIKQB71SoUxqFxDnsf/YtRh42eY1Za4A8=; b=iR3F6EVIf5GFCV9zI4G36g7pk+Ror9CDdMLnkKZleneWn5NGZWLmf5d87tsray5MEl 1k+xzjKD3EGRmX9PveIbmPB8hTMMdSQgMyj2rdyVqO+WyScKi204z4PArfG4LUWNLWjF jwCIygzR/CdlRtTKFQE600WEaG3Gq/PR9SiA9RX1CMlP50qdGTdMxbP+xTxrhUfCnLYF trsmZXxsp6MN7MqcZ+Im5qWtTyith+wQTyxwkxUKfVU9MICB7qN6V4hfHNUjoovW5OZA +46nQT7Jzbu9yE6wihKiwVUlRiqteH/D65rVKB7R+LTpmGWL6G2rxPVozDmN3tqmbVbG MmzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=WVI7T+qZ; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m4si6436708pjk.66.2019.06.05.13.51.01; Wed, 05 Jun 2019 13:51:19 -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=@google.com header.s=20161025 header.b=WVI7T+qZ; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726683AbfFEUso (ORCPT + 99 others); Wed, 5 Jun 2019 16:48:44 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:40396 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726477AbfFEUso (ORCPT ); Wed, 5 Jun 2019 16:48:44 -0400 Received: by mail-pf1-f196.google.com with SMTP id u17so35137pfn.7 for ; Wed, 05 Jun 2019 13:48:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Gf36/FJbmvcIKQB71SoUxqFxDnsf/YtRh42eY1Za4A8=; b=WVI7T+qZtVEnyq5ZQtNNc6p8ErkwczAYREEK8DBsct2+ctCli/t1y+PGIeTMbkm3fo SstGkCzPWEb+Cx6li46d+n9sAQMufEh3WYdaLmWqU9b6lyPJ8lYKCCjcUzoMeJxfosx2 drDkUF7J+5+mqVVkquXPaNaVMItINGIoMemq93eMTsMaVY0U6ACrdh9NtYefm357B5PH 3w/wOk/4Y9PkD62xH7O573/32c2sugfS5y/ofkpiwKOgU2wPekGDUGQ64Sg8etaLiSGV IAXvSYStLoGg1BznpPh3rJcDmObUGqtNviYlYyljrGyrN2EyPxXuS6RaFg7JmQf0gZh5 aqcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Gf36/FJbmvcIKQB71SoUxqFxDnsf/YtRh42eY1Za4A8=; b=meiW4OpcdOcuTtP7L0+vEpvxiKuuk9UHvzBfoFX4fs76iFuq7bhOwjlvocGIcFBQ0G bTjHgKIV/lzPFxzqJz2YMGqwUY6yHsnc+GsTR9/KO2pKApleCKbjn81nlpnqwqMjPEkp slF6B8AlDIjYKm+pztRB1zrFuaNhW82Gi/NMqb2WgYLrEUnX2hNyEd8DIPXwHqikn8AT fE1BB90wo05qTrVfsqoBEZ8OuOj5PpQgr/sp8diFr3KmCubdTbjD1x/Sj/zyAfzCa2aU T8bTBy3uKw5TIOHpH+H9/9+OeqfAjctAWs59LqoT/4o2wVP2QlSQm5lpMF4Dzw6EPifM MwkQ== X-Gm-Message-State: APjAAAVuDJUoyOEq1QVOET9IYoVj2BmF22jr9l/ha4Ykm+ECiVFvFAIl m4lENO9dn24Cy6D5ItG5AuYFPNATzclmh06itT2rlA== X-Received: by 2002:a63:52:: with SMTP id 79mr829652pga.381.1559767722964; Wed, 05 Jun 2019 13:48:42 -0700 (PDT) MIME-Version: 1.0 References: <779905244.a0lJJiZRjM@devpool35> <20190605162626.GA31164@kroah.com> In-Reply-To: From: Nick Desaulniers Date: Wed, 5 Jun 2019 13:48:31 -0700 Message-ID: Subject: Re: Building arm64 EFI stub with -fpie breaks build of 4.9.x (undefined reference to `__efistub__GLOBAL_OFFSET_TABLE_') To: Ard Biesheuvel Cc: Greg KH , Rolf Eike Beer , Linus Torvalds , Matt Fleming , Peter Zijlstra , Thomas Gleixner , linux-efi , Linux Kernel Developers List , stable , clang-built-linux 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 Wed, Jun 5, 2019 at 11:42 AM Ard Biesheuvel wrote: > For the record, this is an example of why I think backporting those > clang enablement patches is a bad idea. There's always a risk involved with backports of any kind; more CI coverage can help us mitigate some of these risks in an automated fashion before we get user reports like this. I meet with the KernelCI folks weekly, so I'll double check on the coverage of the stable tree's branches. The 0day folks are also very responsive and I've spoken with them a few times, so I'll try to get to the bottom of why this wasn't reported by either of those. Also, these patches help keep Android, CrOS, and Google internal production kernels closer to their upstream sources. > We can't actually build those > kernels with clang, can we? So what is the point? Here's last night's build: https://travis-ci.com/ClangBuiltLinux/continuous-integration/builds/114388434 Also, Android and CrOS have shipped X million devices w/ 4.9 kernels built with Clang. I think this number will grow at least one order of magnitude imminently. > Alternatively, we can just revert this patch from 4.9 That would break at least the above devices next time Android and CrOS pulled from stable. > It would be helpful to get a relocation dump (objdump -r) of > arm64-stub.o to figure out which symbol needs a 'hidden' annotation to > prevent GCC from emitting it as a PIC reference requiring a GOT. Sounds like the best way forward, as well as having more info on which config/toolchain reliably reproduces the issue. -- Thanks, ~Nick Desaulniers