diff options
author | WANG Rui <wangrui@loongson.cn> | 2023-11-25 15:26:43 +0800 |
---|---|---|
committer | Simon Horman <horms@kernel.org> | 2023-12-02 12:42:17 +0000 |
commit | 22dcf5cb940a1f1174d601ad7dacf16b91ca6b44 (patch) | |
tree | d8d479af005e6d0ede131f7a677749432fa41045 | |
parent | 44e7b73c331f557fb1e6cddada11205a7a96de46 (diff) | |
download | kexec-tools-22dcf5cb940a1f1174d601ad7dacf16b91ca6b44.tar.gz |
lzma: Relax memory limit for lzma decompressor
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>
Signed-off-by: Simon Horman <horms@kernel.org>
-rw-r--r-- | kexec/lzma.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kexec/lzma.c b/kexec/lzma.c index 2fc07e6c..56778d1d 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); |