All of lore.kernel.org
 help / color / mirror / Atom feed
* kexec does not load
@ 2008-11-25 12:47 Bernhard Walle
  2008-11-26  1:20 ` [PATCH] Fix kexec x86_64 load failed bug Huang Ying
  0 siblings, 1 reply; 8+ messages in thread
From: Bernhard Walle @ 2008-11-25 12:47 UTC (permalink / raw)
  To: Huang Ying; +Cc: kexec

Hi Huang,

your patch:

    commit ceb04ae1223ba5cdd40df744aa73a32b2cc7d879
    Author: Huang Ying <ying.huang@intel.com>
    Date:   Wed Oct 29 11:24:25 2008 +0800

    kexec jump support for kexec-tools
    
    To support memory backup/restore an option named
    --load-preserve-context is added to kexec. When it is specified
    toggether with --mem-max, most segments for crash dump support are
    loaded, and the memory range between mem_min to mem_max which has no
    segments loaded are loaded as backup segments. To support jump back
    from kexeced, options named --load-jump-back-helper and --entry are
    added to load a helper image with specified entry to jump back.
    
    Signed-off-by: Huang Ying <ying.huang@intel.com>
    Signed-off-by: Simon Horman <horms@verge.net.au>

broke kexec on my system (x86-64) with Xen. With the patch:

   Symbol: cmdline_end not found cannot set

Without the patch it does work. The command line was:

    /sbin/kexec -p /boot/vmlinuz-2.6.27.5-2-default \
         --append="root=/dev/disk/by-id/scsi-3500000e0159c2510-part6 \
                   console=tty0 console=ttyS0,57600 \
                   sysrq_always_enabled panic=100 \
                   resume=/dev/disk/by-id/scsi-3500000e0159c2510-part2 \
                   xencons=ttyS vga=normal console=ttyS0,57600 \
                   elevator=deadline sysrq=1 reset_devices irqpoll \
                   maxcpus=1 kernelversion=2.6.27.7-3-xen " \
         --initrd=/boot/initrd-2.6.27.5-2-default-kdump

I don't know the cause. Can you analyse? I can help with testing
patches, of course, but I have no time to analyse the problem now. :-(


Regards,
Bernhard


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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH] Fix kexec x86_64 load failed bug
  2008-11-25 12:47 kexec does not load Bernhard Walle
@ 2008-11-26  1:20 ` Huang Ying
  2008-11-26  3:25   ` Randy Dunlap
  0 siblings, 1 reply; 8+ messages in thread
From: Huang Ying @ 2008-11-26  1:20 UTC (permalink / raw)
  To: Bernhard Walle; +Cc: kexec@lists.infradead.org


[-- Attachment #1.1: Type: text/plain, Size: 915 bytes --]

Fix a bug of kexec load on x86_64. Kexec fails to do load on x86_64, with
error message:

  Symbol: cmdline_end not found cannot set

Because kexec/arch/i386/kexec-bzImage.c accesses cmdline_end symbol in
i386 purgatory, but there is no cmdline_end in x86_64 purgatory, and
kexec-bzImage.c is used by x86_64 too.

cmdline_end is added into x86_64 purgatory to solve the bug, because kexec
jump support for x86_64 is planned.

Reported-by: Bernhard Walle <bwalle@suse.de>
Signed-off-by: Huang Ying <ying.huang@intel.com>

diff --git a/purgatory/arch/x86_64/purgatory-x86_64.c b/purgatory/arch/x86_64/purgatory-x86_64.c
index 374b554..67a37f9 100644
--- a/purgatory/arch/x86_64/purgatory-x86_64.c
+++ b/purgatory/arch/x86_64/purgatory-x86_64.c
@@ -5,6 +5,7 @@
 uint8_t reset_vga = 0;
 uint8_t legacy_pic = 0;
 uint8_t panic_kernel = 0;
+char *cmdline_end = 0;
 
 void setup_arch(void)
 {


[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

[-- Attachment #2: Type: text/plain, Size: 143 bytes --]

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

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] Fix kexec x86_64 load failed bug
  2008-11-26  1:20 ` [PATCH] Fix kexec x86_64 load failed bug Huang Ying
@ 2008-11-26  3:25   ` Randy Dunlap
  2008-11-26  4:25     ` Huang Ying
  0 siblings, 1 reply; 8+ messages in thread
From: Randy Dunlap @ 2008-11-26  3:25 UTC (permalink / raw)
  To: Huang Ying; +Cc: Bernhard Walle, kexec@lists.infradead.org

Huang Ying wrote:
> Fix a bug of kexec load on x86_64. Kexec fails to do load on x86_64, with
> error message:
> 
>   Symbol: cmdline_end not found cannot set
> 
> Because kexec/arch/i386/kexec-bzImage.c accesses cmdline_end symbol in
> i386 purgatory, but there is no cmdline_end in x86_64 purgatory, and
> kexec-bzImage.c is used by x86_64 too.
> 
> cmdline_end is added into x86_64 purgatory to solve the bug, because kexec
> jump support for x86_64 is planned.
> 
> Reported-by: Bernhard Walle <bwalle@suse.de>
> Signed-off-by: Huang Ying <ying.huang@intel.com>
> 
> diff --git a/purgatory/arch/x86_64/purgatory-x86_64.c b/purgatory/arch/x86_64/purgatory-x86_64.c
> index 374b554..67a37f9 100644
> --- a/purgatory/arch/x86_64/purgatory-x86_64.c
> +++ b/purgatory/arch/x86_64/purgatory-x86_64.c
> @@ -5,6 +5,7 @@
>  uint8_t reset_vga = 0;
>  uint8_t legacy_pic = 0;
>  uint8_t panic_kernel = 0;
> +char *cmdline_end = 0;
>  
>  void setup_arch(void)
>  {

This isn't kernel code?  Where is /purgatory/ ?

Anyway, for kernel code, that should be:
char *cmdline_end = NULL;

-- 
~Randy

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] Fix kexec x86_64 load failed bug
  2008-11-26  3:25   ` Randy Dunlap
@ 2008-11-26  4:25     ` Huang Ying
  2008-11-26  6:16       ` Simon Horman
  0 siblings, 1 reply; 8+ messages in thread
From: Huang Ying @ 2008-11-26  4:25 UTC (permalink / raw)
  To: Randy Dunlap; +Cc: Bernhard Walle, kexec@lists.infradead.org


[-- Attachment #1.1: Type: text/plain, Size: 265 bytes --]

On Wed, 2008-11-26 at 11:25 +0800, Randy Dunlap wrote:
> This isn't kernel code?  Where is /purgatory/ ?
> 
> Anyway, for kernel code, that should be:
> char *cmdline_end = NULL;

This patch is against kexec tools, not kernel.

Best Regards,
Huang Ying


[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

[-- Attachment #2: Type: text/plain, Size: 143 bytes --]

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] Fix kexec x86_64 load failed bug
  2008-11-26  4:25     ` Huang Ying
@ 2008-11-26  6:16       ` Simon Horman
  2008-11-26  6:47         ` Huang Ying
  0 siblings, 1 reply; 8+ messages in thread
From: Simon Horman @ 2008-11-26  6:16 UTC (permalink / raw)
  To: Huang Ying; +Cc: Randy Dunlap, Bernhard Walle, kexec@lists.infradead.org

On Wed, Nov 26, 2008 at 12:25:51PM +0800, Huang Ying wrote:
> On Wed, 2008-11-26 at 11:25 +0800, Randy Dunlap wrote:
> > This isn't kernel code?  Where is /purgatory/ ?
> > 
> > Anyway, for kernel code, that should be:
> > char *cmdline_end = NULL;
> 
> This patch is against kexec tools, not kernel.
> 
> Best Regards,
> Huang Ying

Hi Huang,

I think that I would prefer "char *cmdline_end = NULL;" for kexec-tools
code too.

-- 
Simon Horman
  VA Linux Systems Japan K.K., Sydney, Australia Satellite Office
  H: www.vergenet.net/~horms/             W: www.valinux.co.jp/en


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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] Fix kexec x86_64 load failed bug
  2008-11-26  6:16       ` Simon Horman
@ 2008-11-26  6:47         ` Huang Ying
  2008-11-26  7:48           ` Simon Horman
  0 siblings, 1 reply; 8+ messages in thread
From: Huang Ying @ 2008-11-26  6:47 UTC (permalink / raw)
  To: Simon Horman; +Cc: Randy Dunlap, Bernhard Walle, kexec@lists.infradead.org


[-- Attachment #1.1: Type: text/plain, Size: 1648 bytes --]

On Wed, 2008-11-26 at 14:16 +0800, Simon Horman wrote:
> On Wed, Nov 26, 2008 at 12:25:51PM +0800, Huang Ying wrote:
> > On Wed, 2008-11-26 at 11:25 +0800, Randy Dunlap wrote:
> > > This isn't kernel code?  Where is /purgatory/ ?
> > > 
> > > Anyway, for kernel code, that should be:
> > > char *cmdline_end = NULL;
> > 
> > This patch is against kexec tools, not kernel.
> > 
> > Best Regards,
> > Huang Ying
> 
> Hi Huang,
> 
> I think that I would prefer "char *cmdline_end = NULL;" for kexec-tools
> code too.

Patch v2 follows with NULL instead of 0.

Best Regards,
Huang Ying
---------------------------------------------------->
Fix a bug of kexec load on x86_64. Kexec fails to do load on x86_64, with
error message:

  Symbol: cmdline_end not found cannot set

Because kexec/arch/i386/kexec-bzImage.c accesses cmdline_end symbol in
i386 purgatory, but there is no cmdline_end in x86_64 purgatory, and
kexec-bzImage.c is used by x86_64 too.

cmdline_end is added into x86_64 purgatory to solve the bug, because kexec
jump support for x86_64 is planned.

Reported-by: Bernhard Walle <bwalle@suse.de>
Signed-off-by: Huang Ying <ying.huang@intel.com>

---
 purgatory/arch/x86_64/purgatory-x86_64.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/purgatory/arch/x86_64/purgatory-x86_64.c
+++ b/purgatory/arch/x86_64/purgatory-x86_64.c
@@ -1,10 +1,12 @@
 #include <stdint.h>
+#include <stddef.h>
 #include <purgatory.h>
 #include "purgatory-x86_64.h"
 
 uint8_t reset_vga = 0;
 uint8_t legacy_pic = 0;
 uint8_t panic_kernel = 0;
+char *cmdline_end = NULL;
 
 void setup_arch(void)
 {


[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

[-- Attachment #2: Type: text/plain, Size: 143 bytes --]

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] Fix kexec x86_64 load failed bug
  2008-11-26  6:47         ` Huang Ying
@ 2008-11-26  7:48           ` Simon Horman
  2008-11-26  9:07             ` Bernhard Walle
  0 siblings, 1 reply; 8+ messages in thread
From: Simon Horman @ 2008-11-26  7:48 UTC (permalink / raw)
  To: Huang Ying; +Cc: Randy Dunlap, Bernhard Walle, kexec@lists.infradead.org

On Wed, Nov 26, 2008 at 02:47:38PM +0800, Huang Ying wrote:
> On Wed, 2008-11-26 at 14:16 +0800, Simon Horman wrote:
> > On Wed, Nov 26, 2008 at 12:25:51PM +0800, Huang Ying wrote:
> > > On Wed, 2008-11-26 at 11:25 +0800, Randy Dunlap wrote:
> > > > This isn't kernel code?  Where is /purgatory/ ?
> > > > 
> > > > Anyway, for kernel code, that should be:
> > > > char *cmdline_end = NULL;
> > > 
> > > This patch is against kexec tools, not kernel.
> > > 
> > > Best Regards,
> > > Huang Ying
> > 
> > Hi Huang,
> > 
> > I think that I would prefer "char *cmdline_end = NULL;" for kexec-tools
> > code too.
> 
> Patch v2 follows with NULL instead of 0.

Thanks, applied.

-- 
Simon Horman
  VA Linux Systems Japan K.K., Sydney, Australia Satellite Office
  H: www.vergenet.net/~horms/             W: www.valinux.co.jp/en


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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] Fix kexec x86_64 load failed bug
  2008-11-26  7:48           ` Simon Horman
@ 2008-11-26  9:07             ` Bernhard Walle
  0 siblings, 0 replies; 8+ messages in thread
From: Bernhard Walle @ 2008-11-26  9:07 UTC (permalink / raw)
  To: Simon Horman; +Cc: Randy Dunlap, kexec@lists.infradead.org, Huang Ying

* Simon Horman [2008-11-26 16:48]:
>
> On Wed, Nov 26, 2008 at 02:47:38PM +0800, Huang Ying wrote:
> > On Wed, 2008-11-26 at 14:16 +0800, Simon Horman wrote:
> > > On Wed, Nov 26, 2008 at 12:25:51PM +0800, Huang Ying wrote:
> > > > On Wed, 2008-11-26 at 11:25 +0800, Randy Dunlap wrote:
> > > > > This isn't kernel code?  Where is /purgatory/ ?
> > > > > 
> > > > > Anyway, for kernel code, that should be:
> > > > > char *cmdline_end = NULL;
> > > > 
> > > > This patch is against kexec tools, not kernel.
> > > > 
> > > > Best Regards,
> > > > Huang Ying
> > > 
> > > Hi Huang,
> > > 
> > > I think that I would prefer "char *cmdline_end = NULL;" for kexec-tools
> > > code too.
> > 
> > Patch v2 follows with NULL instead of 0.
> 
> Thanks, applied.

Verified. Huang, thanks for the quick fix!


    Bernhard
-- 
Bernhard Walle, SUSE Linux Products GmbH, Architecture Development

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2008-11-26  9:07 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-25 12:47 kexec does not load Bernhard Walle
2008-11-26  1:20 ` [PATCH] Fix kexec x86_64 load failed bug Huang Ying
2008-11-26  3:25   ` Randy Dunlap
2008-11-26  4:25     ` Huang Ying
2008-11-26  6:16       ` Simon Horman
2008-11-26  6:47         ` Huang Ying
2008-11-26  7:48           ` Simon Horman
2008-11-26  9:07             ` Bernhard Walle

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.