Re: [PATCH] pstore: add zstd compression support

From: Kees Cook
Date: Wed Aug 01 2018 - 18:38:12 EST


On Wed, Aug 1, 2018 at 4:23 AM, Geliang Tang <geliangtang@xxxxxxxxx> wrote:
> This patch added the 6th compression algorithm support for pstore: zstd.
>
> Signed-off-by: Geliang Tang <geliangtang@xxxxxxxxx>

Thanks! I've applied this to my tree and it should be visible in -next soon.

> +#if IS_ENABLED(CONFIG_PSTORE_ZSTD_COMPRESS)
> +static int zbufsize_zstd(size_t size)
> +{
> + return ZSTD_compressBound(size);
> +}
> +#endif

One thing I've been pondering is if there might be a way to extend the
crypto compression API to provide the "buffer output size" interface
directly. If that happened, pstore wouldn't need per-compression-algo
entries like it still has.

-Kees

--
Kees Cook
Pixel Security