public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Ingo Molnar <mingo@elte.hu>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	"H.J. Lu" <hjl.tools@gmail.com>, Greg KH <gregkh@suse.de>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Jarkko Sakkinen <jarkko.sakkinen@intel.com>
Subject: Urgent: x86-32 and GNU ld 2.22.52.0.1
Date: Fri, 18 May 2012 08:56:54 -0700	[thread overview]
Message-ID: <4FB67146.9080804@zytor.com> (raw)

I need an urgent opinion.  It seems we have an epic mess on our hands.

GNU ld 2.22.52.0.1 silently changed the semantics of section-relative
symbols that are part of otherwise empty sections, and silently changes
them to absolute.  We rely on section-relative symbols staying
section-relative, and actually have several sections in the linker
script solely for this purpose.

The postprocessor for the x86-32 kernel, relocs.c, currently doesn't
enforce its audited absolute symbols list.  As part of the
tip:x86/trampoline rework, however, I made it error out rather that
silently producing bad output.

Ingo has found that with this particular version of GNU ld, the error
triggers.  I want to emphasize that this merely catches an error which
the current version of the tool would have allowed to silently go by,
which would have (possibly) caused a failure if the kernel was
subsequently booted in anything but its default location.

There are a few ways we can deal with this, but I think we need to do
one or the other:

1. We can blacklist this version of GNU ld.
2. We can uprev the tool to the one from the tip:x86/trampoline work,
   with error checking, and give it a list of symbols that should
   be relative but may end up as absolute.  We risk build errors for
   some people if the list isn't complete.
3. We do a minimal forward-port of the error checking into the current
   tool.
4. We add to the list of relative symbols in the current version of
   the tool without adding the error checking.

However, since it seems clear that we're silently producing corrupt
kernels out of the current build, I think we need a fix for this for 3.4.

	-hpa

-- 
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.


             reply	other threads:[~2012-05-18 15:57 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-18 15:56 H. Peter Anvin [this message]
2012-05-18 16:11 ` Urgent: x86-32 and GNU ld 2.22.52.0.1 H. Peter Anvin
2012-05-18 16:14 ` H.J. Lu
2012-05-18 16:16   ` H.J. Lu
2012-05-18 16:19     ` H. Peter Anvin
2012-05-18 16:35       ` H.J. Lu
2012-05-18 16:46         ` H. Peter Anvin
2012-05-18 16:50           ` H.J. Lu
2012-05-18 16:51             ` H. Peter Anvin
2012-05-18 18:41               ` Greg KH
2012-05-18 18:52                 ` H. Peter Anvin
2012-05-18 19:11                   ` Greg KH
2012-05-18 19:13                     ` H. Peter Anvin
2012-05-18 16:20   ` H. Peter Anvin
2012-05-18 16:55     ` Josh Boyer
2012-05-19 10:20       ` Ingo Molnar
2012-05-19 18:12         ` H. Peter Anvin

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=4FB67146.9080804@zytor.com \
    --to=hpa@zytor.com \
    --cc=gregkh@suse.de \
    --cc=hjl.tools@gmail.com \
    --cc=jarkko.sakkinen@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=torvalds@linux-foundation.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