[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <201906201042.3BF5CD6@keescook>
Date: Thu, 20 Jun 2019 10:58:08 -0700
From: Kees Cook <keescook@...omium.org>
To: Ross Zwisler <zwisler@...nel.org>, Ingo Molnar <mingo@...nel.org>
Cc: Johannes Hirte <johannes.hirte@...enkhaos.de>,
Klaus Kusche <klaus.kusche@...puterix.info>, bp@...e.de,
x86@...nel.org, samitolvanen@...gle.com,
LKML <linux-kernel@...r.kernel.org>,
Guenter Roeck <groeck@...gle.com>,
Ross Zwisler <zwisler@...gle.com>
Subject: Re: [PATCH] x86/build: Move _etext to actual end of .text
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@...enkhaos.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
Powered by blists - more mailing lists