All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Dike <jdike@addtoit.com>
To: Arjan van de Ven <arjan@infradead.org>
Cc: Andrew Morton <akpm@osdl.org>,
	uml-devel <user-mode-linux-devel@lists.sourceforge.net>,
	Alberto Pires de Oliveira Neto <apon1@terra.com.br>,
	giedrius@su.lt, LKML <linux-kernel@vger.kernel.org>,
	stable@kernel.org
Subject: Re: [uml-devel] [PATCH] UML - Add a .note.SuSE section
Date: Thu, 16 Aug 2007 15:26:39 -0400	[thread overview]
Message-ID: <20070816192639.GA8957@c2.user-mode-linux.org> (raw)
In-Reply-To: <1187281856.2663.0.camel@laptopd505.fenrus.org>

On Thu, Aug 16, 2007 at 09:30:56AM -0700, Arjan van de Ven wrote:
> this sounds like something really stupid and bad... why would the kernel
> need to have a per-distro note section???

On Thu, Aug 16, 2007 at 09:39:06AM -0700, Chris Wright wrote:
> Huh!?  Why do we need a SuSE section?

On Thu, Aug 16, 2007 at 09:54:55AM -0700, Greg KH wrote:
> I agree, what did we mess up in the SuSE kernel to require such a hack?

Beats the crap out of me.

Drop this patch - it looks like it might just be papering over
symptoms rather than fixing the real problem - see below.

What I do know is that current UML doesn't run when built on a SuSE
host, the UML commit which caused it to break is
c35e584c087381aaa5f1ed40a28b978535c18fb2 

	http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=c35e584c087381aaa5f1ed40a28b978535c18fb2;hp=a5bd1786fb30abe663b904f6d79bba413e9ba883

and the difference between a working UML binary and a broken one is
this:

+  1 .note.ABI-tag 00000020  0000000060000254  0000000060000254  00000254  2**2
+                  CONTENTS, ALLOC, LOAD, READONLY, DATA
+  2 .note.SuSE    00000018  0000000060000274  0000000060000274  00000274  2**2
+                  CONTENTS, ALLOC, LOAD, READONLY, DATA

and the .note.SuSE section makes the difference.

Looking into it a bit further, the contents of the section are:

	objdump --section=.note.SuSE -s uml8796-linux-good

	uml8796-linux-good:     file format elf64-x86-64

	Contents of section .note.SuSE:
	 60000274 05000000 04000000 53755345 53755345  ........SuSESuSE
	 60000284 00000000 01000a02                    ........        

which seems kind of pointless, but also harmless.

The crash is in this section:

  __uml_setup_start = .;
  .uml.setup.init : { *(.uml.setup.init) }
  __uml_setup_end = .;

with &__uml_setup_start being 8 bytes before the start of the first
16-byte structure in .uml.setup.init, so the structures are misaligned
wrt the start symbol.

I don't see any connection between the presence of a section at the
start of the binary and this misalignment, so the patch is probably wrong.

				Jeff

-- 
Work email - jdike at linux dot intel dot com

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

WARNING: multiple messages have this Message-ID (diff)
From: Jeff Dike <jdike@addtoit.com>
To: Arjan van de Ven <arjan@infradead.org>
Cc: Andrew Morton <akpm@osdl.org>,
	stable@kernel.org, LKML <linux-kernel@vger.kernel.org>,
	uml-devel <user-mode-linux-devel@lists.sourceforge.net>,
	Alberto Pires de Oliveira Neto <apon1@terra.com.br>,
	giedrius@su.lt
Subject: Re: [PATCH] UML - Add a .note.SuSE section
Date: Thu, 16 Aug 2007 15:26:39 -0400	[thread overview]
Message-ID: <20070816192639.GA8957@c2.user-mode-linux.org> (raw)
In-Reply-To: <1187281856.2663.0.camel@laptopd505.fenrus.org>

On Thu, Aug 16, 2007 at 09:30:56AM -0700, Arjan van de Ven wrote:
> this sounds like something really stupid and bad... why would the kernel
> need to have a per-distro note section???

On Thu, Aug 16, 2007 at 09:39:06AM -0700, Chris Wright wrote:
> Huh!?  Why do we need a SuSE section?

On Thu, Aug 16, 2007 at 09:54:55AM -0700, Greg KH wrote:
> I agree, what did we mess up in the SuSE kernel to require such a hack?

Beats the crap out of me.

Drop this patch - it looks like it might just be papering over
symptoms rather than fixing the real problem - see below.

What I do know is that current UML doesn't run when built on a SuSE
host, the UML commit which caused it to break is
c35e584c087381aaa5f1ed40a28b978535c18fb2 

	http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=c35e584c087381aaa5f1ed40a28b978535c18fb2;hp=a5bd1786fb30abe663b904f6d79bba413e9ba883

and the difference between a working UML binary and a broken one is
this:

+  1 .note.ABI-tag 00000020  0000000060000254  0000000060000254  00000254  2**2
+                  CONTENTS, ALLOC, LOAD, READONLY, DATA
+  2 .note.SuSE    00000018  0000000060000274  0000000060000274  00000274  2**2
+                  CONTENTS, ALLOC, LOAD, READONLY, DATA

and the .note.SuSE section makes the difference.

Looking into it a bit further, the contents of the section are:

	objdump --section=.note.SuSE -s uml8796-linux-good

	uml8796-linux-good:     file format elf64-x86-64

	Contents of section .note.SuSE:
	 60000274 05000000 04000000 53755345 53755345  ........SuSESuSE
	 60000284 00000000 01000a02                    ........        

which seems kind of pointless, but also harmless.

The crash is in this section:

  __uml_setup_start = .;
  .uml.setup.init : { *(.uml.setup.init) }
  __uml_setup_end = .;

with &__uml_setup_start being 8 bytes before the start of the first
16-byte structure in .uml.setup.init, so the structures are misaligned
wrt the start symbol.

I don't see any connection between the presence of a section at the
start of the binary and this misalignment, so the patch is probably wrong.

				Jeff

-- 
Work email - jdike at linux dot intel dot com

  parent reply	other threads:[~2007-08-16 19:27 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-16 16:24 [uml-devel] [PATCH] UML - Add a .note.SuSE section Jeff Dike
2007-08-16 16:24 ` Jeff Dike
2007-08-16 16:30 ` [uml-devel] " Arjan van de Ven
2007-08-16 16:30   ` Arjan van de Ven
2007-08-16 16:54   ` [uml-devel] [stable] " Greg KH
2007-08-16 16:54     ` Greg KH
2007-08-16 19:26   ` Jeff Dike [this message]
2007-08-16 19:26     ` Jeff Dike
2007-08-16 20:04     ` [uml-devel] " Sam Ravnborg
2007-08-16 20:04       ` Sam Ravnborg
2007-08-16 21:05       ` [uml-devel] " Jeff Dike
2007-08-16 21:05         ` Jeff Dike
2007-08-21 17:05         ` [uml-devel] " Blaisorblade
2007-08-21 17:05           ` Blaisorblade
2007-08-22 16:37           ` Jeff Dike
2007-08-22 16:37             ` Jeff Dike
2007-08-23 14:50             ` Blaisorblade
2007-08-23 14:50               ` Blaisorblade
2007-08-16 16:39 ` [uml-devel] [stable] " Chris Wright
2007-08-16 16:39   ` Chris Wright
2007-08-16 19:30 ` [uml-devel] " Andi Kleen
2007-08-16 19:30   ` Andi Kleen

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=20070816192639.GA8957@c2.user-mode-linux.org \
    --to=jdike@addtoit.com \
    --cc=akpm@osdl.org \
    --cc=apon1@terra.com.br \
    --cc=arjan@infradead.org \
    --cc=giedrius@su.lt \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@kernel.org \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.