x86: Bump ZO_z_extra_bytes margin for zstd
authorNick Terrell <terrelln@fb.com>
Thu, 30 Jul 2020 19:08:38 +0000 (12:08 -0700)
committerIngo Molnar <mingo@kernel.org>
Fri, 31 Jul 2020 09:49:08 +0000 (11:49 +0200)
commit0fe4f4ef8cc8e15a8f29f08f4be6128395f125f6
tree8d232b77e48c68b061254cf7eae412bde867a074
parenta30d8a39f0571425a459816ed8680e987a2ff279
x86: Bump ZO_z_extra_bytes margin for zstd

Bump the ZO_z_extra_bytes margin for zstd.

Zstd needs 3 bytes per 128 KB, and has a 22 byte fixed overhead.
Zstd needs to maintain 128 KB of space at all times, since that is
the maximum block size. See the comments regarding in-place
decompression added in lib/decompress_unzstd.c for details.

The existing code is written so that all the compression algorithms use
the same ZO_z_extra_bytes. It is taken to be the maximum of the growth
rate plus the maximum fixed overhead. The comments just above this diff
state that:

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-6-nickrterrell@gmail.com
arch/x86/boot/header.S