Kexec Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kexec: fix uImage probe false positive
@ 2014-02-06  7:50 Baruch Siach
  2014-02-06  8:04 ` Simon Horman
  0 siblings, 1 reply; 2+ messages in thread
From: Baruch Siach @ 2014-02-06  7:50 UTC (permalink / raw)
  To: Simon Horman; +Cc: Suzuki K. Poulose, Baruch Siach, kexec

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>
---
 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

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

* Re: [PATCH] kexec: fix uImage probe false positive
  2014-02-06  7:50 [PATCH] kexec: fix uImage probe false positive Baruch Siach
@ 2014-02-06  8:04 ` Simon Horman
  0 siblings, 0 replies; 2+ messages in thread
From: Simon Horman @ 2014-02-06  8:04 UTC (permalink / raw)
  To: Baruch Siach; +Cc: Suzuki K. Poulose, kexec

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

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

end of thread, other threads:[~2014-02-06  8:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-06  7:50 [PATCH] kexec: fix uImage probe false positive Baruch Siach
2014-02-06  8:04 ` Simon Horman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox