Skip to content

Commit

Permalink
lzma: Relax memory limit for lzma decompressor
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
heiher authored and horms committed Nov 27, 2023
1 parent 34810aa commit 3472c2b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kexec/lzma.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 3472c2b

Please sign in to comment.