+ lib-zlib-adjust-offset-calculation-for-dfltcc_state.patch added to mm-nonmm-unstable branch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: lib/zlib: adjust offset calculation for dfltcc_state
has been added to the -mm mm-nonmm-unstable branch.  Its filename is
     lib-zlib-adjust-offset-calculation-for-dfltcc_state.patch

This patch will shortly appear at
     https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/lib-zlib-adjust-offset-calculation-for-dfltcc_state.patch

This patch will later appear in the mm-nonmm-unstable branch at
    git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days

------------------------------------------------------
From: Mikhail Zaslonko <zaslonko@xxxxxxxxxxxxx>
Subject: lib/zlib: adjust offset calculation for dfltcc_state
Date: Thu, 26 Jan 2023 14:14:21 +0100

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
<iii@xxxxxxxxxxxxx>.  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@xxxxxxxxxxxxx
Link: https://lkml.kernel.org/r/20230126131428.1222214-2-zaslonko@xxxxxxxxxxxxx
Signed-off-by: Mikhail Zaslonko <zaslonko@xxxxxxxxxxxxx>
Acked-by: Ilya Leoshkevich <iii@xxxxxxxxxxxxx>
Cc: Heiko Carstens <hca@xxxxxxxxxxxxx> (s390)
Cc: Vasily Gorbik <gor@xxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 lib/zlib_dfltcc/dfltcc.h |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/lib/zlib_dfltcc/dfltcc.h~lib-zlib-adjust-offset-calculation-for-dfltcc_state
+++ a/lib/zlib_dfltcc/dfltcc.h
@@ -100,8 +100,9 @@ struct dfltcc_state {
     char msg[64];                      /* Buffer for strm->msg */
 };
 
+#define ALIGN_UP(p, size) (__typeof__(p))(((uintptr_t)(p) + ((size) - 1)) & ~((size) - 1))
 /* Resides right after inflate_state or deflate_state */
-#define GET_DFLTCC_STATE(state) ((struct dfltcc_state *)((state) + 1))
+#define GET_DFLTCC_STATE(state) ((struct dfltcc_state *)((char *)(state) + ALIGN_UP(sizeof(*state), 8)))
 
 /* External functions */
 int dfltcc_can_deflate(z_streamp strm);
_

Patches currently in -mm which might be from zaslonko@xxxxxxxxxxxxx are

lib-zlib-adjust-offset-calculation-for-dfltcc_state.patch
lib-zlib-implement-switching-between-dfltcc-and-software.patch
lib-zlib-fix-dfltcc-not-flushing-eobs-when-creating-raw-streams.patch
lib-zlib-fix-dfltcc-ignoring-flush-modes-when-avail_in-==-0.patch
lib-zlib-dfltcc-not-writing-header-bits-when-avail_out-==-0.patch
lib-zlib-split-deflate-and-inflate-states-for-dfltcc.patch
lib-zlib-dfltcc-support-inflate-with-small-window.patch
lib-zlib-dfltcc-always-switch-to-software-inflate-for-z_packet_flush-option.patch




[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux