lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210910130954.1392104-1-lucjan.lucjanov@gmail.com>
Date:   Fri, 10 Sep 2021 15:09:54 +0200
From:   Piotr Gorski <lucjan.lucjanov@...il.com>
To:     linux-kernel@...r.kernel.org
Cc:     linux-kbuild@...r.kernel.org,
        Michal Marek <michal.lkml@...kovi.net>,
        Masahiro Yamada <masahiroy@...nel.org>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Piotr Gorski <lucjan.lucjanov@...il.com>
Subject: [PATCH] kbuild: use smaller dictionary size for zstd module compression

By default, zstd without parameters uses a dictionary size of 8 MB.
However, most modules are much smaller than that.
Use a dictionary size of 2 MB for module compression, resulting in
slightly higher compression speed while still maintaining a good
compression ratio.
The --zstd=wlog=21 option is equivalent to --lzma2=dict=2MiB used in XZ compression.

Signed-off-by: Piotr Gorski <lucjan.lucjanov@...il.com>
---
 scripts/Makefile.modinst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/Makefile.modinst b/scripts/Makefile.modinst
index ff9b09e4cfca..c3475e5aca7c 100644
--- a/scripts/Makefile.modinst
+++ b/scripts/Makefile.modinst
@@ -97,7 +97,7 @@ quiet_cmd_gzip = GZIP    $@
 quiet_cmd_xz = XZ      $@
       cmd_xz = $(XZ) --lzma2=dict=2MiB -f $<
 quiet_cmd_zstd = ZSTD    $@
-      cmd_zstd = $(ZSTD) -T0 --rm -f -q $<
+      cmd_zstd = $(ZSTD) --zstd=wlog=21 -T0 --rm -f -q $<
 
 $(dst)/%.ko.gz: $(dst)/%.ko FORCE
 	$(call cmd,gzip)
-- 
2.33.0.142.ge0a2f5cbc5

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ