kexec fails on ARM boards because initrd is placed too close to the kernel image

Bug #568283 reported by Eric Miao
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kexec-tools (Ubuntu)
Fix Released
Undecided
Loïc Minier
Lucid
Fix Released
Undecided
Loïc Minier

Bug Description

Binary package hint: kexec-tools

On ARM, zImage or compressed uImage will decompress into somewhere behind and may possibly overwrite the initrd area if initrd is placed too close to the kernel image. Try to fix this by offsetting initrd to a safer place.

Tags: patch

Related branches

Revision history for this message
Eric Miao (eric.y.miao) wrote :
Revision history for this message
Loïc Minier (lool) wrote :

So I understand this is a workaround and that the correct upstream fix would be to check the actual expected kernel size and pick a proper offset depending on that.

My understanding is also that this impacts pretty much all Ubuntu-alike kernels (that is, big ones) and as such would be desirable to fix in lucid as to allow kexec to work on ARM in QEMU or on hardware platforms like the ones supported in Ubuntu lucid (dove, imx51, qcm-msm?, omap3).

Do you confirm it affects all our ARM platforms? On which ones was this tested?

Could you share some test instructions? Ideally, I'd love to test on qemu versatile and beagleboard.

Revision history for this message
Loïc Minier (lool) wrote :
Revision history for this message
Eric Miao (eric.y.miao) wrote :

Loic,

Test is rather straight forward. My tests here are generally two ways (after installing kexec-tools package):

1. enable kexec reboot in /etc/default/kexec, and doing reboot every time there after will invoke kexec to reboot, e.g.

  LOAD_KEXEC=true
  KERNEL_IMAGE="/boot/uImage"
  INITRD="/boot/initrd.img"
  APPEND="....."

2. specify directly in command line, #> kexec -l /boot/uImage --initrd=/boot/initrd.img --append="...."; kexec -e

I'll get status confirmed on other boards later.

Revision history for this message
Eric Miao (eric.y.miao) wrote :

Loic,

The package works OK with /boot/vmlinuz

Loïc Minier (lool)
Changed in kexec-tools (Ubuntu Lucid):
assignee: nobody → Loïc Minier (lool)
Loïc Minier (lool)
Changed in kexec-tools (Ubuntu Lucid):
status: New → Fix Committed
tags: added: patch
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package kexec-tools - 1:2.0.1-1ubuntu3

---------------
kexec-tools (1:2.0.1-1ubuntu3) lucid; urgency=low

  * New dpatch, arm-higher-initrd-load-addr, bump initrd load offset from
    0x800000 to 0x8000000 since our kernels are so big that they overwrite the
    initrd when they uncompress; fixes kexec initrd support on all ARM Ubuntu
    kernels; LP: #568283.
 -- Loic Minier <email address hidden> Thu, 22 Apr 2010 14:06:08 +0200

Changed in kexec-tools (Ubuntu Lucid):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.