All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: "Olaf Hering" <olaf@aepfle.de>
Cc: <kexec@lists.infradead.org>, <xen-devel@lists.xensource.com>,
	"Daniel Kiper" <dkiper@net-space.pl>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [Xen-devel] incorrect layout of globals from head_64.S during kexec boot
Date: Fri, 06 Jul 2012 15:50:20 +0100	[thread overview]
Message-ID: <4FF7174C020000780008E1FF@nat28.tlf.novell.com> (raw)
In-Reply-To: <20120706141419.GA21951@aepfle.de>

>>> On 06.07.12 at 16:14, Olaf Hering <olaf@aepfle.de> wrote:
> On Fri, Jul 06, Olaf Hering wrote:
> 
>> I will cleanup my debug changes and post the output.
> 
> What I see is that the content of the uncompressed vmlinux is
> appearently already corrupted after decompress().  After I made small
> changes to arch/x86/boot/compressed/misc.c and arch/x86/kernel/head_64.S
> the offset in memory changed from 0x2c to 0x8.
> 
> This could mean that the unzip code is broken, but this is rather
> unlikely. The odd thing is, if the first kernel is forced to return
> false in xen_hvm_platform() to disable the PVonHVM features then kexec
> works ok.
> 
> Could it be that some code tweaks the stack content used by decompress()
> in some odd way? But that would most likely lead to a crash, not to
> unexpected uncompressing results.

Especially if the old and new kernel are using the exact same
image, how about the decompression writing over the shared
info page causing all this? As the decompressor wouldn't
expect Xen to possibly write stuff there itself, it could easily be
that some repeat count gets altered, thus breaking the
decompressed data without the decompression code necessarily
noticing.

If that's the case, there would be a more general problem here
(for kdump at least), as granted pages could also still get written
to when the new kernel already is in the process of launching.

Jan


WARNING: multiple messages have this Message-ID (diff)
From: "Jan Beulich" <JBeulich@suse.com>
To: Olaf Hering <olaf@aepfle.de>
Cc: kexec@lists.infradead.org, xen-devel@lists.xensource.com,
	Daniel Kiper <dkiper@net-space.pl>,
	linux-kernel@vger.kernel.org
Subject: Re: [Xen-devel] incorrect layout of globals from head_64.S during kexec boot
Date: Fri, 06 Jul 2012 15:50:20 +0100	[thread overview]
Message-ID: <4FF7174C020000780008E1FF@nat28.tlf.novell.com> (raw)
In-Reply-To: <20120706141419.GA21951@aepfle.de>

>>> On 06.07.12 at 16:14, Olaf Hering <olaf@aepfle.de> wrote:
> On Fri, Jul 06, Olaf Hering wrote:
> 
>> I will cleanup my debug changes and post the output.
> 
> What I see is that the content of the uncompressed vmlinux is
> appearently already corrupted after decompress().  After I made small
> changes to arch/x86/boot/compressed/misc.c and arch/x86/kernel/head_64.S
> the offset in memory changed from 0x2c to 0x8.
> 
> This could mean that the unzip code is broken, but this is rather
> unlikely. The odd thing is, if the first kernel is forced to return
> false in xen_hvm_platform() to disable the PVonHVM features then kexec
> works ok.
> 
> Could it be that some code tweaks the stack content used by decompress()
> in some odd way? But that would most likely lead to a crash, not to
> unexpected uncompressing results.

Especially if the old and new kernel are using the exact same
image, how about the decompression writing over the shared
info page causing all this? As the decompressor wouldn't
expect Xen to possibly write stuff there itself, it could easily be
that some repeat count gets altered, thus breaking the
decompressed data without the decompression code necessarily
noticing.

If that's the case, there would be a more general problem here
(for kdump at least), as granted pages could also still get written
to when the new kernel already is in the process of launching.

Jan

WARNING: multiple messages have this Message-ID (diff)
From: "Jan Beulich" <JBeulich@suse.com>
To: Olaf Hering <olaf@aepfle.de>
Cc: xen-devel@lists.xensource.com, kexec@lists.infradead.org,
	linux-kernel@vger.kernel.org, Daniel Kiper <dkiper@net-space.pl>
Subject: Re: [Xen-devel] incorrect layout of globals from head_64.S during kexec boot
Date: Fri, 06 Jul 2012 15:50:20 +0100	[thread overview]
Message-ID: <4FF7174C020000780008E1FF@nat28.tlf.novell.com> (raw)
In-Reply-To: <20120706141419.GA21951@aepfle.de>

>>> On 06.07.12 at 16:14, Olaf Hering <olaf@aepfle.de> wrote:
> On Fri, Jul 06, Olaf Hering wrote:
> 
>> I will cleanup my debug changes and post the output.
> 
> What I see is that the content of the uncompressed vmlinux is
> appearently already corrupted after decompress().  After I made small
> changes to arch/x86/boot/compressed/misc.c and arch/x86/kernel/head_64.S
> the offset in memory changed from 0x2c to 0x8.
> 
> This could mean that the unzip code is broken, but this is rather
> unlikely. The odd thing is, if the first kernel is forced to return
> false in xen_hvm_platform() to disable the PVonHVM features then kexec
> works ok.
> 
> Could it be that some code tweaks the stack content used by decompress()
> in some odd way? But that would most likely lead to a crash, not to
> unexpected uncompressing results.

Especially if the old and new kernel are using the exact same
image, how about the decompression writing over the shared
info page causing all this? As the decompressor wouldn't
expect Xen to possibly write stuff there itself, it could easily be
that some repeat count gets altered, thus breaking the
decompressed data without the decompression code necessarily
noticing.

If that's the case, there would be a more general problem here
(for kdump at least), as granted pages could also still get written
to when the new kernel already is in the process of launching.

Jan


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

  reply	other threads:[~2012-07-06 14:49 UTC|newest]

Thread overview: 70+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-05 21:06 incorrect layout of globals from head_64.S during kexec boot Olaf Hering
2012-07-05 21:06 ` Olaf Hering
2012-07-06  8:29 ` [Xen-devel] " Jan Beulich
2012-07-06  8:29   ` Jan Beulich
2012-07-06  8:29   ` Jan Beulich
2012-07-06  8:41 ` Daniel Kiper
2012-07-06  8:41   ` Daniel Kiper
2012-07-06  8:41   ` Daniel Kiper
2012-07-06 12:07   ` Olaf Hering
2012-07-06 12:07     ` Olaf Hering
2012-07-06 12:56     ` [Xen-devel] " Jan Beulich
2012-07-06 12:56       ` Jan Beulich
2012-07-06 12:56       ` Jan Beulich
2012-07-06 13:31       ` Olaf Hering
2012-07-06 13:31         ` Olaf Hering
2012-07-06 13:31         ` Olaf Hering
2012-07-06 13:53         ` Jan Beulich
2012-07-06 13:53           ` Jan Beulich
2012-07-06 13:53           ` Jan Beulich
2012-07-06 14:14         ` Olaf Hering
2012-07-06 14:14           ` Olaf Hering
2012-07-06 14:50           ` Jan Beulich [this message]
2012-07-06 14:50             ` Jan Beulich
2012-07-06 14:50             ` Jan Beulich
2012-07-06 17:29             ` Olaf Hering
2012-07-06 17:29               ` Olaf Hering
2012-07-10  9:33               ` Olaf Hering
2012-07-10  9:33                 ` Olaf Hering
2012-07-10 14:14                 ` Konrad Rzeszutek Wilk
2012-07-10 14:14                   ` Konrad Rzeszutek Wilk
2012-07-10 14:46                   ` Ian Campbell
2012-07-10 14:46                     ` Ian Campbell
2012-07-10 14:51                     ` Konrad Rzeszutek Wilk
2012-07-10 14:51                       ` Konrad Rzeszutek Wilk
2012-07-10 14:51                       ` Konrad Rzeszutek Wilk
2012-07-10 15:29                       ` Ian Campbell
2012-07-10 15:29                         ` Ian Campbell
2012-07-10 15:29                         ` Ian Campbell
2012-07-10 15:37                         ` Olaf Hering
2012-07-10 15:37                           ` Olaf Hering
2012-07-10 15:23                   ` Olaf Hering
2012-07-10 15:23                     ` Olaf Hering
2012-07-10 17:26                     ` Konrad Rzeszutek Wilk
2012-07-10 17:26                       ` Konrad Rzeszutek Wilk
2012-07-10 17:26                       ` Konrad Rzeszutek Wilk
2012-07-10 18:09                       ` Olaf Hering
2012-07-10 18:09                         ` Olaf Hering
2012-07-10 18:32                         ` Konrad Rzeszutek Wilk
2012-07-10 18:32                           ` Konrad Rzeszutek Wilk
2012-07-10 19:08                         ` Keir Fraser
2012-07-10 19:08                           ` Keir Fraser
2012-07-10 19:08                           ` Keir Fraser
2012-07-13 20:20                           ` Olaf Hering
2012-07-13 20:20                             ` Olaf Hering
2012-07-14  4:54                             ` Keir Fraser
2012-07-14  4:54                               ` Keir Fraser
2012-07-14  4:54                               ` Keir Fraser
2012-07-15 16:06                           ` Olaf Hering
2012-07-15 16:06                             ` Olaf Hering
2012-07-15 17:17                             ` Keir Fraser
2012-07-15 17:17                               ` Keir Fraser
2012-07-15 17:17                               ` Keir Fraser
2012-07-16 15:46                             ` Konrad Rzeszutek Wilk
2012-07-16 15:46                               ` Konrad Rzeszutek Wilk
2012-07-17 10:24                               ` Olaf Hering
2012-07-17 10:24                                 ` Olaf Hering
2012-07-17 12:34                                 ` Olaf Hering
2012-07-17 12:34                                   ` Olaf Hering
2012-07-06 15:54     ` Daniel Kiper
2012-07-06 15:54       ` Daniel Kiper

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=4FF7174C020000780008E1FF@nat28.tlf.novell.com \
    --to=jbeulich@suse.com \
    --cc=dkiper@net-space.pl \
    --cc=kexec@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=olaf@aepfle.de \
    --cc=xen-devel@lists.xensource.com \
    /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.