Skip to content
Commit 9010dbc0 authored by Mikhail Zaslonko's avatar Mikhail Zaslonko Committed by Andrew Morton
Browse files

lib/zlib: DFLTCC support inflate with small window

There is no hardware control for DFLTCC window size.  After this change,
software and hardware window formats no longer match: the software will
use wbits and wsize, and the hardware will use HB_BITS and HB_SIZE.

Since neither dictionary manipulation nor internal allocation functions
are relevant to kernel zlib and zlib_inflate_workspacesize() always use
MAX_WBITS for window size calculation, only dfltcc_can_inflate() and
dfltcc_inflate() functions are affected by this patch.

This commit is based on:
  https://github.com/zlib-ng/zlib-ng/commit/3eab317

Link: https://lkml.kernel.org/r/20230126131428.1222214-8-zaslonko@linux.ibm.com


Signed-off-by: default avatarMikhail Zaslonko <zaslonko@linux.ibm.com>
Acked-by: default avatarIlya Leoshkevich <iii@linux.ibm.com>
Cc: Heiko Carstens <hca@linux.ibm.com>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 9fec9f8e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment