]> git.baikalelectronics.ru Git - kernel.git/commit
lib: Add zstd support to decompress
authorNick Terrell <terrelln@fb.com>
Thu, 30 Jul 2020 19:08:35 +0000 (12:08 -0700)
committerIngo Molnar <mingo@kernel.org>
Fri, 31 Jul 2020 09:49:08 +0000 (11:49 +0200)
commit8431403d5ed24f224b4fd758c6f82d5b81f4ed14
tree503649537075d61fddbfec3f73736d57e5c33a2e
parentd9245a43a9c41d2063e4750e3bbbd79c9a936f5e
lib: Add zstd support to decompress

- Add unzstd() and the zstd decompress interface.

- Add zstd support to decompress_method().

The decompress_method() and unzstd() functions are used to decompress
the initramfs and the initrd. The __decompress() function is used in
the preboot environment to decompress a zstd compressed kernel.

The zstd decompression function allows the input and output buffers to
overlap because that is used by x86 kernel decompression.

Signed-off-by: Nick Terrell <terrelln@fb.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20200730190841.2071656-3-nickrterrell@gmail.com
include/linux/decompress/unzstd.h [new file with mode: 0644]
lib/Kconfig
lib/Makefile
lib/decompress.c
lib/decompress_unzstd.c [new file with mode: 0644]