From: "Suzuki K. Poulose" <suzuki@in.ibm.com>
To: horms@verge.net.au
Cc: msm@freescale.com, bigeasy@linutronix.de, kexec@lists.infradead.org
Subject: Re: [PATCH] kexec/uImage: probe to identify a corrupted image
Date: Wed, 24 Apr 2013 10:50:43 +0530 [thread overview]
Message-ID: <51776BAB.5000705@in.ibm.com> (raw)
In-Reply-To: <20130417102022.6919.82083.stgit@suzukikp>
On 04/17/2013 03:52 PM, Suzuki K. Poulose wrote:
> From: Suzuki K. Poulose <suzuki@in.ibm.com>
>
> Teach uImage_probe_xxx() to return the information about
> a corrupted image. This is required to prevent the loading
> of a corrupted ramdisk, where we don't have strict checking
> for the other formats, unlike the kernel. So, we should abort
> the operation than causing a problem with the new kernel.
>
> Without this patch, a corrupted uImage ramdisk is treated as
> a plain ramdisk where there is no format check involved.
>
> # kexec -l uImage --initrd romfs-initrd.corrupt
> The data CRC does not match. Computed: 867e73f7 expected 8f097cc0
> # echo $?
> 0
> # kexec -e
> Starting new kernel
> Bye!
> Reserving 55MB of memory at 70MB for crashkernel (System RAM: 256MB)
> Using Xilinx Virtex440 machine description
> Linux version 3.6.0-rc3 (root@suzukikp) (gcc version 4.3.4 [gcc-4_3-branch revision 152973] (GCC) ) #66 Tue Apr 16 06:36:56 UTC 2013
> Found initrd at 0xcf5f8000:0xcfff8040
> ...
>
> NET: Registered protocol family 17
> RAMDISK: Couldn't find valid RAM disk image starting at 0.
> List of all partitions:
> No filesystem could mount root, tried: ext2 cramfs
> Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(1,0)
>
>
> With this patch :
>
> # kexec -l uImage --initrd romfs-initrd.corrupt
> uImage: The data CRC does not match. Computed: 867e73f7 expected 8f097cc0
> uImage: Corrupted ramdisk file romfs-initrd
>
> With a corrupted kernel image(the behaviour remains the same) :
> # kexec -l uImage.corrupt --initrd romfs-initrd
> uImage: The data CRC does not match. Computed: 285787b7 expected e37f65ad
> Cannot determine the file type of uImage.corrupt
>
> Signed-off-by: Suzuki K. Poulose <suzuki@in.ibm.com>
Simon,
Looks like there are no concerns about the approach in this patch. Could
you please pull this in ?
Thanks
Suzuki
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
next prev parent reply other threads:[~2013-04-24 5:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-17 10:22 [PATCH] kexec/uImage: probe to identify a corrupted image Suzuki K. Poulose
2013-04-24 5:20 ` Suzuki K. Poulose [this message]
2013-04-25 13:26 ` Simon Horman
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=51776BAB.5000705@in.ibm.com \
--to=suzuki@in.ibm.com \
--cc=bigeasy@linutronix.de \
--cc=horms@verge.net.au \
--cc=kexec@lists.infradead.org \
--cc=msm@freescale.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.