linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kees Cook <keescook@chromium.org>
To: Ross Zwisler <zwisler@kernel.org>, Ingo Molnar <mingo@kernel.org>
Cc: Johannes Hirte <johannes.hirte@datenkhaos.de>,
	Klaus Kusche <klaus.kusche@computerix.info>,
	bp@suse.de, x86@kernel.org, samitolvanen@google.com,
	LKML <linux-kernel@vger.kernel.org>,
	Guenter Roeck <groeck@google.com>,
	Ross Zwisler <zwisler@google.com>
Subject: Re: [PATCH] x86/build: Move _etext to actual end of .text
Date: Thu, 20 Jun 2019 10:58:08 -0700	[thread overview]
Message-ID: <201906201042.3BF5CD6@keescook> (raw)
In-Reply-To: <CAOxpaSXKXRcZi0KnQz_6SxajZ6Nv61Bjm5xmG0Ydw3Madv0-tQ@mail.gmail.com>

On Wed, Jun 19, 2019 at 12:37:11PM -0600, Ross Zwisler wrote:
> On Sun, Jun 9, 2019 at 1:00 PM Johannes Hirte
> <johannes.hirte@datenkhaos.de> 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

  reply	other threads:[~2019-06-20 17:58 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-09  9:35 [PATCH] x86/build: Move _etext to actual end of .text Klaus Kusche
2019-06-09 18:40 ` Johannes Hirte
2019-06-19 18:37   ` Ross Zwisler
2019-06-20 17:58     ` Kees Cook [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-06-05 16:08 Alec Ari
2019-06-05 18:16 ` Kees Cook
2019-06-05 18:43   ` Greg KH
2019-06-01  8:51 Klaus Kusche
2019-04-23 18:38 Kees Cook
2019-05-14 12:04 ` Johannes Hirte
2019-05-14 15:43   ` Kees Cook
2019-05-14 16:10     ` Johannes Hirte
2019-05-15 18:54       ` Kees Cook
2019-05-16 13:56         ` Johannes Hirte
2019-05-16 17:51           ` Kees Cook

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=201906201042.3BF5CD6@keescook \
    --to=keescook@chromium.org \
    --cc=bp@suse.de \
    --cc=groeck@google.com \
    --cc=johannes.hirte@datenkhaos.de \
    --cc=klaus.kusche@computerix.info \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=samitolvanen@google.com \
    --cc=x86@kernel.org \
    --cc=zwisler@google.com \
    --cc=zwisler@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).