Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp7718546ybi; Wed, 5 Jun 2019 23:57:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqyoyToKVYEaoYCqHzxY17HKDjpNFP55PeljSNlNsJJl8zF3JXdSok+gOQ728MfF38jysWRU X-Received: by 2002:a17:902:70c4:: with SMTP id l4mr12593069plt.171.1559804232859; Wed, 05 Jun 2019 23:57:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559804232; cv=none; d=google.com; s=arc-20160816; b=GIzueBbHag6BfduVoh7b/R/XnVBoTl7wKjKq0kbiWIX/bVAqKsqwgJs1ykyJHlo1Ae /NT323N26odfzwP3qw7RqlLo4bhaQiupUvhyll+WTEZNOXd9RDP6u4GE33TUoy5cSqh2 7uOwMvd/W2V8HSZ5EACg/EoUmL+0h5dr7iFioCDABZXNmVuE+j0YbNQKhRUvDO+ngbbF jM3+tCrr/0QT+NObswj20pa+Vvr3wsS6G0ByF27w/fo2YUdwYe4+Fmut+tI0ATToWWBk b4TvdFjcqyuMptVM5fqgf64YNXkFo2TtJkjn9+pStLaQcQE48I/qodVoXb+JvcIcNV+N 1ZMg== 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=HzYHOcm04V7pY89OMe1ayw64K31F1RwMQUnnebF2vQg=; b=JLSDAu9VVtJZEG3a4uuX9UibLTRdmqfk5siJI5KI5S30KB0HF2AqF08AkR27gBS8IM Jq8+fW6rggxFV/jP87c0GpPREjwIBNNzkqcCb3dpPK/ym+2S2NZ6yfztQsMXpDOg0ZMF YB8oC3325TCV6uqDuME3T0JvguV7NNSWNmaNNGIaBKVTdjkIGZxdM4hEwwo0xEt2bYTk WP+VsFZBDuiha4GiObyYw9Kl+hHE9LWGuC8PhK2b68itWbuUY4SUIICA0g5rN1xg4Zuy JbxV7GIqN9FqpDQeAPIC5KCUcpprnDsLjattjhAGJlD4JlIKLPlId9fr0btCMR19QgMf y96A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PCZ8xQ+z; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w13si976160plp.271.2019.06.05.23.56.56; Wed, 05 Jun 2019 23:57:12 -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=@linaro.org header.s=google header.b=PCZ8xQ+z; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726709AbfFFGzn (ORCPT + 99 others); Thu, 6 Jun 2019 02:55:43 -0400 Received: from mail-io1-f68.google.com ([209.85.166.68]:42052 "EHLO mail-io1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725267AbfFFGzn (ORCPT ); Thu, 6 Jun 2019 02:55:43 -0400 Received: by mail-io1-f68.google.com with SMTP id u19so974244ior.9 for ; Wed, 05 Jun 2019 23:55:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=HzYHOcm04V7pY89OMe1ayw64K31F1RwMQUnnebF2vQg=; b=PCZ8xQ+zgS+exi65IVAynpf6n2dVQ2aMd8IZrDp05SrkbQi3WQ4ysjYvQ7bwaWkaCs yxrfn82fV2bko0z2eGUAdF/UEchtticxfogCLaowjdt8DdcQGJYkGS2wpSP+R9a88/Vj xwb9ucRn8Y28nfwLDvP5EuTmjhIUah2DFaB8JK4shJkX11tDoNblzipsiZ1rNUKla7WL d3Y1jAUm3echWSkinPSRxj7grvrYAPCeDxKGfASBDjYW3p6lZeoKb6yaeRORtm9d5MSu /gGjtE2ZpU6hpYhKUqAApETWMTbCMMlvK48wgJ1ixCAIqKK/J2Wqy/p0t4/ssQVVkmxl 6XWg== 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=HzYHOcm04V7pY89OMe1ayw64K31F1RwMQUnnebF2vQg=; b=N4H/vNNNnDen7oMRgH75jzFnqHIS5Fbyvf2y44kREimQwvloE6ArEigl1n3fDibtab Db861f1ht07ZlaHVrR9naTr2WaGvxcIN45FS4Sv8uBEOGrvVSPZJy2Uqu4D2mpraFQEr mrBNwKTgXcfgTNGRu9YTpaWXSMp1WcQbi9MBdZ+t6MX3K8cDpHbai8JJtaT7+GA71qdG Z5KB5qR0D9OeIVKL/7eB8fIxwisQm//ACv36CqmlbEoDTncx8ragyd6EPHJfwpHKdObl R1B2/9h1G8hWxK7/3077FB44s3zkhuAmCXaShgM4/s47+QBEYZDB6XTPbCSLi4DwiujJ Hzqw== X-Gm-Message-State: APjAAAUUhr/65ozHzEWTAaiibz+NzZLoWgEapjW3k8Oe+it6V/Yr3qjx 3dGkOQ/2CbBx+h0I6w1g2qrTQ999JbssZ6xsjbd1qA== X-Received: by 2002:a5d:9d83:: with SMTP id 3mr25129792ion.65.1559804142376; Wed, 05 Jun 2019 23:55:42 -0700 (PDT) MIME-Version: 1.0 References: <779905244.a0lJJiZRjM@devpool35> <20190605162626.GA31164@kroah.com> In-Reply-To: From: Ard Biesheuvel Date: Thu, 6 Jun 2019 08:55:29 +0200 Message-ID: Subject: Re: Building arm64 EFI stub with -fpie breaks build of 4.9.x (undefined reference to `__efistub__GLOBAL_OFFSET_TABLE_') To: Nick Desaulniers 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, 5 Jun 2019 at 22:48, Nick Desaulniers wrote: > > 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 > If you are saying that plain upstream 4.9-stable defconfig can be built with Clang, then I am pleasantly surprised. > 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. > I know that (since you keep reminding me :-)), but obviously, Google does not care about changes that regress GCC support. > > 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. Let me know once you can reproduce it, I will have a look as well.