<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/lib/zlib_dfltcc, branch v6.6.132</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.132</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.132'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2023-02-03T06:50:10+00:00</updated>
<entry>
<title>lib/zlib: remove redundation assignement of avail_in dfltcc_gdht()</title>
<updated>2023-02-03T06:50:10+00:00</updated>
<author>
<name>Tom Rix</name>
<email>trix@redhat.com</email>
</author>
<published>2023-01-28T16:50:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e89bd9e7d8eb63a183040eaf0c9640fdb34ec47a'/>
<id>urn:sha1:e89bd9e7d8eb63a183040eaf0c9640fdb34ec47a</id>
<content type='text'>
cppcheck reports
lib/zlib_dfltcc/dfltcc_deflate.c:65:21: warning: Redundant assignment of 'avail_in' to itself. [selfAssignment]
    size_t avail_in = avail_in = strm-&gt;avail_in;

Only setting avail_in once is needed.

Link: https://lkml.kernel.org/r/20230128165048.1245792-1-trix@redhat.com
Fixes: aa5b395b69b6 ("lib/zlib: add s390 hardware support for kernel zlib_deflate")
Signed-off-by: Tom Rix &lt;trix@redhat.com&gt;
Acked-by: Ilya Leoshkevich &lt;iii@linux.ibm.com&gt;
Acked-by: Mikhail Zaslonko &lt;zaslonko@linux.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>lib/zlib: DFLTCC always switch to software inflate for Z_PACKET_FLUSH option</title>
<updated>2023-02-03T06:50:09+00:00</updated>
<author>
<name>Mikhail Zaslonko</name>
<email>zaslonko@linux.ibm.com</email>
</author>
<published>2023-01-26T13:14:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f65c35d3336ec8c7af6e12b7fd15acfb4b8e9ffa'/>
<id>urn:sha1:f65c35d3336ec8c7af6e12b7fd15acfb4b8e9ffa</id>
<content type='text'>
Since hardware inflate does not support Z_PACKET_FLUSH option (used
exclusively by kernel PPP driver), always switch to software like we
already do for Z_BLOCK flush option.  Without this patch, PPP might get
Z_DATA_ERROR return code from zlib_inflate() and disable zlib compression
for the packets.

Link: https://lkml.kernel.org/r/20230126131428.1222214-9-zaslonko@linux.ibm.com
Signed-off-by: Mikhail Zaslonko &lt;zaslonko@linux.ibm.com&gt;
Acked-by: Ilya Leoshkevich &lt;iii@linux.ibm.com&gt;
Cc: Heiko Carstens &lt;hca@linux.ibm.com&gt;
Cc: Vasily Gorbik &lt;gor@linux.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>lib/zlib: DFLTCC support inflate with small window</title>
<updated>2023-02-03T06:50:09+00:00</updated>
<author>
<name>Mikhail Zaslonko</name>
<email>zaslonko@linux.ibm.com</email>
</author>
<published>2023-01-26T13:14:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9010dbc007b853ed55905e40fa8e9d39fcb75935'/>
<id>urn:sha1:9010dbc007b853ed55905e40fa8e9d39fcb75935</id>
<content type='text'>
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: Mikhail Zaslonko &lt;zaslonko@linux.ibm.com&gt;
Acked-by: Ilya Leoshkevich &lt;iii@linux.ibm.com&gt;
Cc: Heiko Carstens &lt;hca@linux.ibm.com&gt;
Cc: Vasily Gorbik &lt;gor@linux.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>lib/zlib: Split deflate and inflate states for DFLTCC</title>
<updated>2023-02-03T06:50:09+00:00</updated>
<author>
<name>Mikhail Zaslonko</name>
<email>zaslonko@linux.ibm.com</email>
</author>
<published>2023-01-26T13:14:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9fec9f8ea51c782d58a8b86f8e868fc06c782386'/>
<id>urn:sha1:9fec9f8ea51c782d58a8b86f8e868fc06c782386</id>
<content type='text'>
Currently deflate and inflate both use a common state struct. There are
several variables in this struct that we don't need for inflate, and
more may be coming in the future. Therefore split them in two separate
structs.
Apart from that, introduce separate headers for dfltcc_deflate and
dfltcc_inflate.

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

Link: https://lkml.kernel.org/r/20230126131428.1222214-7-zaslonko@linux.ibm.com
Signed-off-by: Mikhail Zaslonko &lt;zaslonko@linux.ibm.com&gt;
Acked-by: Ilya Leoshkevich &lt;iii@linux.ibm.com&gt;
Cc: Heiko Carstens &lt;hca@linux.ibm.com&gt;
Cc: Vasily Gorbik &lt;gor@linux.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>lib/zlib: DFLTCC not writing header bits when avail_out == 0</title>
<updated>2023-02-03T06:50:09+00:00</updated>
<author>
<name>Mikhail Zaslonko</name>
<email>zaslonko@linux.ibm.com</email>
</author>
<published>2023-01-26T13:14:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=cbf125408d1ca141cc1c3f8376e091e3cdde2cb2'/>
<id>urn:sha1:cbf125408d1ca141cc1c3f8376e091e3cdde2cb2</id>
<content type='text'>
This commit is based on:
  https://github.com/zlib-ng/zlib-ng/commit/ce409c6

Link: https://lkml.kernel.org/r/20230126131428.1222214-6-zaslonko@linux.ibm.com
Signed-off-by: Mikhail Zaslonko &lt;zaslonko@linux.ibm.com&gt;
Acked-by: Ilya Leoshkevich &lt;iii@linux.ibm.com&gt;
Cc: Heiko Carstens &lt;hca@linux.ibm.com&gt;
Cc: Vasily Gorbik &lt;gor@linux.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>lib/zlib: fix DFLTCC ignoring flush modes when avail_in == 0</title>
<updated>2023-02-03T06:50:08+00:00</updated>
<author>
<name>Mikhail Zaslonko</name>
<email>zaslonko@linux.ibm.com</email>
</author>
<published>2023-01-26T13:14:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0dbae46550363c88cf073aafc0e0b244b9f43555'/>
<id>urn:sha1:0dbae46550363c88cf073aafc0e0b244b9f43555</id>
<content type='text'>
This commit is based on:
  https://github.com/zlib-ng/zlib-ng/commit/40acb3f

Link: https://lkml.kernel.org/r/20230126131428.1222214-5-zaslonko@linux.ibm.com
Signed-off-by: Mikhail Zaslonko &lt;zaslonko@linux.ibm.com&gt;
Acked-by: Ilya Leoshkevich &lt;iii@linux.ibm.com&gt;
Cc: Heiko Carstens &lt;hca@linux.ibm.com&gt;
Cc: Vasily Gorbik &lt;gor@linux.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>lib/zlib: implement switching between DFLTCC and software</title>
<updated>2023-02-03T06:50:08+00:00</updated>
<author>
<name>Mikhail Zaslonko</name>
<email>zaslonko@linux.ibm.com</email>
</author>
<published>2023-01-26T13:14:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9a549338260ac6eaa495095d4c237aee09aa5a99'/>
<id>urn:sha1:9a549338260ac6eaa495095d4c237aee09aa5a99</id>
<content type='text'>
This commit is based on:
  https://github.com/zlib-ng/zlib-ng/commit/fc04275

Link: https://lkml.kernel.org/r/20230126131428.1222214-3-zaslonko@linux.ibm.com
Signed-off-by: Mikhail Zaslonko &lt;zaslonko@linux.ibm.com&gt;
Acked-by: Ilya Leoshkevich &lt;iii@linux.ibm.com&gt;
Cc: Heiko Carstens &lt;hca@linux.ibm.com&gt;
Cc: Vasily Gorbik &lt;gor@linux.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>lib/zlib: adjust offset calculation for dfltcc_state</title>
<updated>2023-02-03T06:50:08+00:00</updated>
<author>
<name>Mikhail Zaslonko</name>
<email>zaslonko@linux.ibm.com</email>
</author>
<published>2023-01-26T13:14:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4cc06c9afbb4dbed007f06450127ab745d6dc450'/>
<id>urn:sha1:4cc06c9afbb4dbed007f06450127ab745d6dc450</id>
<content type='text'>
Patch series "lib/zlib: Set of s390 DFLTCC related patches for kernel zlib".

Patches 1-7 represent a set of s390 zlib hardware support (DFLTCC) related
fixes and enhancements integrated from zlib-ng repo relevant to kernel
zlib (https://github.com/zlib-ng/zlib-ng).

Since the official zlib repository never got DFLTCC support code merged,
all the patches have been picked from zlib-ng fork (zlib data compression
library for the next generation systems).  This repo contains new
optimizations and fixes not getting implemented into the official zlib
repository and falls under the same zlib License.  All of the original
patches from zlib-ng were authored by Ilya Leoshkevich
&lt;iii@linux.ibm.com&gt;.  Coding style has been preserved for future
maintainability.

Patches 1-2 should have no effect for the kernel zlib but make the code
closer to zlib-ng for future maintainability.

Only Patch 3 touches common zlib_deflate code, other patches are relevant
to s390 tree only.

Patch 8 is separate and intends to resolve an issue with kernel PPP driver
which can use kernel zlib for packet compression.  Without this patch PPP
decompression can fail due to error code returned by hardware
(dfltcc_inflate) and PPP disables zlib compression for further packets.


This patch (of 8):

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

Link: https://lkml.kernel.org/r/20230126131428.1222214-1-zaslonko@linux.ibm.com
Link: https://lkml.kernel.org/r/20230126131428.1222214-2-zaslonko@linux.ibm.com
Signed-off-by: Mikhail Zaslonko &lt;zaslonko@linux.ibm.com&gt;
Acked-by: Ilya Leoshkevich &lt;iii@linux.ibm.com&gt;
Cc: Heiko Carstens &lt;hca@linux.ibm.com&gt; (s390)
Cc: Vasily Gorbik &lt;gor@linux.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>zlib: move EXPORT_SYMBOL() and MODULE_LICENSE() out of dfltcc_syms.c</title>
<updated>2020-12-29T23:36:49+00:00</updated>
<author>
<name>Randy Dunlap</name>
<email>rdunlap@infradead.org</email>
</author>
<published>2020-12-29T23:15:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=605cc30dea249edf1b659e7d0146a2cf13cbbf71'/>
<id>urn:sha1:605cc30dea249edf1b659e7d0146a2cf13cbbf71</id>
<content type='text'>
In commit 11fb479ff5d9 ("zlib: export S390 symbols for zlib modules"), I
added EXPORT_SYMBOL()s to dfltcc_inflate.c but then Mikhail said that
these should probably be in dfltcc_syms.c with the other
EXPORT_SYMBOL()s.

However, that is contrary to the current kernel style, which places
EXPORT_SYMBOL() immediately after the function that it applies to, so
move all EXPORT_SYMBOL()s to their respective function locations and
drop the dfltcc_syms.c file.  Also move MODULE_LICENSE() from the
deleted file to dfltcc.c.

[rdunlap@infradead.org: remove dfltcc_syms.o from Makefile]
  Link: https://lkml.kernel.org/r/20201227171837.15492-1-rdunlap@infradead.org

Link: https://lkml.kernel.org/r/20201219052530.28461-1-rdunlap@infradead.org
Fixes: 11fb479ff5d9 ("zlib: export S390 symbols for zlib modules")
Signed-off-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Cc: Acked-by: Ilya Leoshkevich &lt;iii@linux.ibm.com&gt;
Acked-by: Christian Borntraeger &lt;borntraeger@de.ibm.com&gt;
Cc: Zaslonko Mikhail &lt;zaslonko@linux.ibm.com&gt;
Cc: Heiko Carstens &lt;hca@linux.ibm.com&gt;
Cc: Vasily Gorbik &lt;gor@linux.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>lib/zlib: fix inflating zlib streams on s390</title>
<updated>2020-12-29T23:36:49+00:00</updated>
<author>
<name>Ilya Leoshkevich</name>
<email>iii@linux.ibm.com</email>
</author>
<published>2020-12-29T23:15:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f0bb29e8c4076444d32df00c8d32e169ceecf283'/>
<id>urn:sha1:f0bb29e8c4076444d32df00c8d32e169ceecf283</id>
<content type='text'>
Decompressing zlib streams on s390 fails with "incorrect data check"
error.

Userspace zlib checks inflate_state.flags in order to byteswap checksums
only for zlib streams, and s390 hardware inflate code, which was ported
from there, tries to match this behavior.  At the same time, kernel zlib
does not use inflate_state.flags, so it contains essentially random
values.  For many use cases either zlib stream is zeroed out or checksum
is not used, so this problem is masked, but at least SquashFS is still
affected.

Fix by always passing a checksum to and from the hardware as is, which
matches zlib_inflate()'s expectations.

Link: https://lkml.kernel.org/r/20201215155551.894884-1-iii@linux.ibm.com
Fixes: 126196100063 ("lib/zlib: add s390 hardware support for kernel zlib_inflate")
Signed-off-by: Ilya Leoshkevich &lt;iii@linux.ibm.com&gt;
Tested-by: Christian Borntraeger &lt;borntraeger@de.ibm.com&gt;
Acked-by: Mikhail Zaslonko &lt;zaslonko@linux.ibm.com&gt;
Acked-by: Christian Borntraeger &lt;borntraeger@de.ibm.com&gt;
Cc: Heiko Carstens &lt;hca@linux.ibm.com&gt;
Cc: Vasily Gorbik &lt;gor@linux.ibm.com&gt;
Cc: Mikhail Zaslonko &lt;zaslonko@linux.ibm.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;	[5.6+]
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
