LKML Archive on lore.kernel.org
 help / color / 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
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 index

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-09  9:35 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 publically 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

LKML Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/lkml/0 lkml/git/0.git
	git clone --mirror https://lore.kernel.org/lkml/1 lkml/git/1.git
	git clone --mirror https://lore.kernel.org/lkml/2 lkml/git/2.git
	git clone --mirror https://lore.kernel.org/lkml/3 lkml/git/3.git
	git clone --mirror https://lore.kernel.org/lkml/4 lkml/git/4.git
	git clone --mirror https://lore.kernel.org/lkml/5 lkml/git/5.git
	git clone --mirror https://lore.kernel.org/lkml/6 lkml/git/6.git
	git clone --mirror https://lore.kernel.org/lkml/7 lkml/git/7.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lkml lkml/ https://lore.kernel.org/lkml \
		linux-kernel@vger.kernel.org linux-kernel@archiver.kernel.org
	public-inbox-index lkml

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-kernel


AGPL code for this site: git clone https://public-inbox.org/ public-inbox