Kexec Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] lzma: Relax memory limit for lzma decompressor
@ 2023-11-25  7:26 WANG Rui
  2023-11-27 13:47 ` Simon Horman
  0 siblings, 1 reply; 2+ messages in thread
From: WANG Rui @ 2023-11-25  7:26 UTC (permalink / raw)
  To: kexec; +Cc: Florian Fainelli, Huacai Chen, hev, WANG Rui

The kexec cannot load LZMA compressed vmlinuz.efi on LoongArch.

  Try LZMA decompression.
  lzma_decompress_file: read on /tmp/Image4yyfhM of 65536 bytes failed
  pez_prepare: decompressed size 8563960
  pez_prepare: done
  Cannot load vmlinuz.efi

The root cause is that lzma decompressor requires more memory usage,
which exceeds the current 64M limit.

Reported-by: Huacai Chen <chenhuacai@kernel.org>
Signed-off-by: WANG Rui <wangrui@loongson.cn>
---
 kexec/lzma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kexec/lzma.c b/kexec/lzma.c
index 2fc07e6..56778d1 100644
--- a/kexec/lzma.c
+++ b/kexec/lzma.c
@@ -73,7 +73,7 @@ static LZFILE *lzopen_internal(const char *path, const char *mode, int fd)
 		ret = lzma_alone_encoder(&lzfile->strm, &opt_lzma);
 	} else {
 		ret = lzma_auto_decoder(&lzfile->strm,
-					UINT64_C(64) * 1024 * 1024, 0);
+					UINT64_C(128) * 1024 * 1024, 0);
 	}
 	if (ret != LZMA_OK) {
 		fclose(fp);
-- 
2.42.0


_______________________________________________
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] lzma: Relax memory limit for lzma decompressor
  2023-11-25  7:26 [PATCH] lzma: Relax memory limit for lzma decompressor WANG Rui
@ 2023-11-27 13:47 ` Simon Horman
  0 siblings, 0 replies; 2+ messages in thread
From: Simon Horman @ 2023-11-27 13:47 UTC (permalink / raw)
  To: WANG Rui; +Cc: kexec, Florian Fainelli, Huacai Chen, hev

On Sat, Nov 25, 2023 at 03:26:43PM +0800, WANG Rui wrote:
> The kexec cannot load LZMA compressed vmlinuz.efi on LoongArch.
> 
>   Try LZMA decompression.
>   lzma_decompress_file: read on /tmp/Image4yyfhM of 65536 bytes failed
>   pez_prepare: decompressed size 8563960
>   pez_prepare: done
>   Cannot load vmlinuz.efi
> 
> The root cause is that lzma decompressor requires more memory usage,
> which exceeds the current 64M limit.
> 
> Reported-by: Huacai Chen <chenhuacai@kernel.org>
> Signed-off-by: WANG Rui <wangrui@loongson.cn>

Thanks, applied.

_______________________________________________
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:[~2023-11-27 13:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-25  7:26 [PATCH] lzma: Relax memory limit for lzma decompressor WANG Rui
2023-11-27 13:47 ` Simon Horman

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