Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp2212339ybi; Thu, 20 Jun 2019 10:58:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqytA3fv32CBe00rhIBEKQ9clXW2BKVFUNHIzJyPqWicbOMFxbGs01LBjL8IJ86p6yi69Myf X-Received: by 2002:a17:90a:2706:: with SMTP id o6mr951388pje.62.1561053513530; Thu, 20 Jun 2019 10:58:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561053513; cv=none; d=google.com; s=arc-20160816; b=TWg85fJmrRYptB1RL+mqX5T9TcrKhNq9XK3sTZULGyngHjwgURUwLbTa/WnQ/kjAkd AafLCzKTjS3I0vLOR7/2rnlnijzA1dqZ4LaBQmPE2AKVrG2xYiAgeznHYqa7ZI8rqhwt pTabSiuDeWGqKeCePjUF0eTeG9Id3/M3oqZCGEtHLTQL9NDe2/xLam/NGE/ZEWiZkDAF bQiIdAbzjF8DUHjiEbHp2aFNyeRvozBRnkQH3gfGi9XuaVz6mqu2G+xPmVF8lZxnOvmE 4eaWn6zDpQ6OET2qjAYXlzVLfNvEQV+/rskl4nsCzHwSYaCw/Ap5U+OacjMCDnusOIYr O+vQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=S2gqNASMdYK2WX/SCojHs3iwdhiVO/ELWHI9nIiuc08=; b=0gEzJe0BvT0clsxo3mTMH77HWDgmmnOaZwdpNWqoLJruteYRu/C+7qKd8PIOoHqCOL 9UsWJcUsrbN68MDOtT98ZzdPnI/24BHjfEjxj3ddhgApSil3GTXHwJOLoxUmykCH6Vun 3MPxNLhBa8nzoqtGuAkOY7fR1OTObh1Z7BMYjT6lpQ7icV31GU9RoRB44JVkTvqZ7XJR ASm1GsIrU2XtPO4u7lFmFdfYKCVnkIjwxvAFo5bPc2JblQFiOTA4DIU5DgtZ8cuL9Nvf VWLm3zEcQSICPE1u6RkosQrG1WqmxIJ0c5eOYqBpMtzKPdoH9pS2irEMIiugfNZrwgHQ pt2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Ambiewkc; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id az12si331237plb.165.2019.06.20.10.58.17; Thu, 20 Jun 2019 10:58:33 -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=@chromium.org header.s=google header.b=Ambiewkc; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726703AbfFTR6L (ORCPT + 99 others); Thu, 20 Jun 2019 13:58:11 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:42391 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726523AbfFTR6K (ORCPT ); Thu, 20 Jun 2019 13:58:10 -0400 Received: by mail-pf1-f195.google.com with SMTP id q10so2082107pff.9 for ; Thu, 20 Jun 2019 10:58:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=S2gqNASMdYK2WX/SCojHs3iwdhiVO/ELWHI9nIiuc08=; b=AmbiewkcaBZfbv3X6k0K9MkP95lI+TEtZi+vGAdEh+o40lZrmh5S6BZVYsUH2ICrSF tpGdVMyZeNnqbpPHBk9WWVFcJMCTUsCjZ2KI4VFEydIFPBh8yvw0ay8avXt28l/r3kNI 4EFjqRRfNz4dNjG3sFQGvIQS4qDDYucB0v3jo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=S2gqNASMdYK2WX/SCojHs3iwdhiVO/ELWHI9nIiuc08=; b=L+mEH/3OaZ+21IiTXzYldQJPFnwfz279J3pYk4UyPkGFs7ARc1Cwz7iPy4ZV1Gwvi/ UCyhaU9zzFmjv0qGVfoc6+VgRe/n/0Oha1skfUn7uOLNGD1vpmnz5YJiAPsGcm/LBkeY xtnIcL7PmNtTxmsiZmyLjApPrCnDpeYzRZGh5WCGmvjPnbjqZ3Ic2ZQ/hVgcl3P6JhjZ j7upNY49LManolpPq/l3Kaom8TlZpkyLY42mjiPrSXis2PKPXmL6bXSLDIt7RgTrTuz2 jpiNgg41c6Ch/vjTbx7t//0E0aNco8jcScCklOpEB0I9EgP1I/fWlqdgUtGWEnmuxN1j 7usA== X-Gm-Message-State: APjAAAXAT3i7RukmFAVV7o6kpSB9QZf1QkiuRKpTYDNUfCi1QOu++RN9 ahI0L2UO9LsY3hy5c7KB6wRKVL8YgVM= X-Received: by 2002:a63:5247:: with SMTP id s7mr13372297pgl.29.1561053490021; Thu, 20 Jun 2019 10:58:10 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id t8sm144231pfq.31.2019.06.20.10.58.08 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 20 Jun 2019 10:58:09 -0700 (PDT) Date: Thu, 20 Jun 2019 10:58:08 -0700 From: Kees Cook To: Ross Zwisler , Ingo Molnar Cc: Johannes Hirte , Klaus Kusche , bp@suse.de, x86@kernel.org, samitolvanen@google.com, LKML , Guenter Roeck , Ross Zwisler Subject: Re: [PATCH] x86/build: Move _etext to actual end of .text Message-ID: <201906201042.3BF5CD6@keescook> References: <502d5b36-e0d0-ffcc-5dd4-35db9d033561@computerix.info> <20190609184013.GA11237@probook> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 19, 2019 at 12:37:11PM -0600, Ross Zwisler wrote: > On Sun, Jun 9, 2019 at 1:00 PM Johannes Hirte > wrote: > > On 2019 Jun 09, Klaus Kusche wrote: > > > Hello, > > > > > > Same problem for linux 5.1.7: > > > Kernel building fails with the same relocation error. > > > > > > 5.1.5 does not have the problem, builds fine for me. > > > > > > Is there anything I can do to investigate the problem? > > > > > > > Please try linux 5.1.8. The problematic patch was reverted there. > > I'm having this same issue with v5.2-rc5 using an older version of gcc > (4.9.2). If I use a more recent version of gcc (7.3.0) it works fine. > > Reverting this patch allows gcc v4.9.2 to build kernel v5.2-rc5 successfully. > > You said in this chain that you were reverting this patch in stable > kernels. Are you going to revert it in tip-of-tree as well? My original rationale was that we shouldn't break old toolchains on old kernels (i.e. if a stable kernel built before it should continue to bulid). For the latest kernel it was fixing a future problem and regularizing the linker script (other architectures already do it in this style), however, it seems to not only be an old gcc issue, but also a Gold linker issue. Building with LD=ld.gold blows up on a modern gcc too: $ gcc --version gcc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0 ... $ ld.gold --version GNU gold (GNU Binutils for Ubuntu 2.30) 1.15 ... $ make LD=ld.gold ... ... Invalid absolute R_X86_64_32S relocation: _etext Ingo, seems like this should be reverted. What do you think? -- Kees Cook