Sharyathi Nagesh
2008-05-23 11:36:28 UTC
Hi
While testing with kexec tool, I observed some problems. When
application (kexec) is 32 bit and kernel is 64 bit I observed that
loading crash kernel works without any issues but unloading crash kernel
fails.
--------------------------------------------------------
running strace over 'kexec -u -p'
show the problem to be with sys_kexec_load() call
sys_kexec_load(0, 0, 0, 0x1, 0) = -1 EINVAL (Invalid argument)
write(2, "kexec_load (0 segments) failed: "..., 49
kexec_load (0 segments) failed: Invalid argument
) = 4
--------------------------------------------------------
This is patch to fix the problem, I think kernel code had a typo where in:
if((flags & KEXEC_ARCH_MASK) == KEXEC_ARCH) was used instead of
if((flags & KEXEC_ARCH_MASK) != KEXEC_ARCH)
This patch takes care of that, I have tested the patch it worked fine
for me. Please review the patch and let me know of your views. This
patch is based on linux-2.6.26-rc3.
Thanks
Yeehaw
-------------- next part --------------
A non-text attachment was scrubbed...
Name: compat_sys_kexec_correction.patch
Type: text/x-patch
Size: 596 bytes
Desc: not available
Url : http://lists.linux-foundation.org/pipermail/fastboot/attachments/20080523/54aa1eb3/attachment.bin
While testing with kexec tool, I observed some problems. When
application (kexec) is 32 bit and kernel is 64 bit I observed that
loading crash kernel works without any issues but unloading crash kernel
fails.
--------------------------------------------------------
running strace over 'kexec -u -p'
show the problem to be with sys_kexec_load() call
sys_kexec_load(0, 0, 0, 0x1, 0) = -1 EINVAL (Invalid argument)
write(2, "kexec_load (0 segments) failed: "..., 49
kexec_load (0 segments) failed: Invalid argument
) = 4
--------------------------------------------------------
This is patch to fix the problem, I think kernel code had a typo where in:
if((flags & KEXEC_ARCH_MASK) == KEXEC_ARCH) was used instead of
if((flags & KEXEC_ARCH_MASK) != KEXEC_ARCH)
This patch takes care of that, I have tested the patch it worked fine
for me. Please review the patch and let me know of your views. This
patch is based on linux-2.6.26-rc3.
Thanks
Yeehaw
-------------- next part --------------
A non-text attachment was scrubbed...
Name: compat_sys_kexec_correction.patch
Type: text/x-patch
Size: 596 bytes
Desc: not available
Url : http://lists.linux-foundation.org/pipermail/fastboot/attachments/20080523/54aa1eb3/attachment.bin