Kexec Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <horms@verge.net.au>
To: Baruch Siach <baruch@tkos.co.il>
Cc: "Suzuki K. Poulose" <suzuki@in.ibm.com>, kexec@lists.infradead.org
Subject: Re: [PATCH] kexec: fix uImage probe false positive
Date: Thu, 6 Feb 2014 17:04:17 +0900	[thread overview]
Message-ID: <20140206080416.GG24865@verge.net.au> (raw)
In-Reply-To: <8bf27d38eb0cf5d0c70333ef17cf9f7167a0bf56.1391673023.git.baruch@tkos.co.il>

On Thu, Feb 06, 2014 at 09:50:23AM +0200, Baruch Siach wrote:
> Since bf06cf2095 (kexec/uImage: probe to identify a corrupted image)
> uImage_probe_kernel() returns 1 for non uImage files. Don't treat this value
> as positive probe indication.
> 
> Cc: Suzuki K. Poulose <suzuki@in.ibm.com>
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>

Thanks. I had just applied the same patch from Dave Young.

> ---
>  kexec/kexec.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/kexec/kexec.c b/kexec/kexec.c
> index f13e5124aacc..703d524836b4 100644
> --- a/kexec/kexec.c
> +++ b/kexec/kexec.c
> @@ -691,7 +691,7 @@ static int my_load(const char *type, int fileind, int argc, char **argv,
>  	}
>  	if (!type || guess_only) {
>  		for (i = 0; i < file_types; i++) {
> -			if (file_type[i].probe(kernel_buf, kernel_size) >= 0)
> +			if (file_type[i].probe(kernel_buf, kernel_size) == 0)
>  				break;
>  		}
>  		if (i == file_types) {
> -- 
> 1.8.5.3
> 

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

      reply	other threads:[~2014-02-06  8:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-06  7:50 [PATCH] kexec: fix uImage probe false positive Baruch Siach
2014-02-06  8:04 ` Simon Horman [this message]

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=20140206080416.GG24865@verge.net.au \
    --to=horms@verge.net.au \
    --cc=baruch@tkos.co.il \
    --cc=kexec@lists.infradead.org \
    --cc=suzuki@in.ibm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox