Re: [PATCH] lzma: Relax memory limit for lzma decompressor

2023-11-27 Thread Simon Horman
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 
> Signed-off-by: WANG Rui 

Thanks, applied.

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


[PATCH] lzma: Relax memory limit for lzma decompressor

2023-11-24 Thread 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 
Signed-off-by: WANG Rui 
---
 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(>strm, _lzma);
} else {
ret = lzma_auto_decoder(>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