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-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 8 Apr 2021 02:41:47 +0900
From:   Masahiro Yamada <masahiroy@...nel.org>
To:     Piotr Gorski <lucjan.lucjanov@...il.com>
Cc:     Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
        Oleksandr Natalenko <oleksandr@...alenko.name>
Subject: Re: [PATCH v3] kbuild: add support for zstd compressed modules

On Thu, Apr 8, 2021 at 1:09 AM Piotr Gorski <lucjan.lucjanov@...il.com> wrote:
>
> kmod 28 supports modules compressed in zstd format so let's add this possibility to kernel.
>
> V2 -> V3
>
> * Fix a typo
>
> V1 -> V2
>
> * Rebuild against linux-kbuild tree
>
> Signed-off-by: Piotr Gorski <lucjan.lucjanov@...il.com>


Applied to linux-kbuild. Thanks!


I slightly changed to fix the log alignment.



diff --git a/scripts/Makefile.modinst b/scripts/Makefile.modinst
index f9fa2a3808b2..ff9b09e4cfca 100644
--- a/scripts/Makefile.modinst
+++ b/scripts/Makefile.modinst
@@ -96,7 +96,7 @@ quiet_cmd_gzip = GZIP    $@
       cmd_gzip = $(KGZIP) -n -f $<
 quiet_cmd_xz = XZ      $@
       cmd_xz = $(XZ) --lzma2=dict=2MiB -f $<
-quiet_cmd_zstd = ZSTD      $@
+quiet_cmd_zstd = ZSTD    $@
       cmd_zstd = $(ZSTD) -T0 --rm -f -q $<

 $(dst)/%.ko.gz: $(dst)/%.ko FORCE






> ---
>  init/Kconfig             | 8 +++++++-
>  scripts/Makefile.modinst | 6 ++++++
>  2 files changed, 13 insertions(+), 1 deletion(-)
>
> diff --git a/init/Kconfig b/init/Kconfig
> index 510f6fcd9b7f..b5744d32c4df 100644
> --- a/init/Kconfig
> +++ b/init/Kconfig
> @@ -2242,7 +2242,7 @@ choice
>
>           Please note that the tool used to load modules needs to support the
>           corresponding algorithm. module-init-tools MAY support gzip, and kmod
> -         MAY support gzip and xz.
> +         MAY support gzip, xz and zstd.
>
>           Your build system needs to provide the appropriate compression tool
>           to compress the modules.
> @@ -2267,6 +2267,12 @@ config MODULE_COMPRESS_XZ
>           Compress modules with XZ. The installed modules are suffixed
>           with .ko.xz.
>
> +config MODULE_COMPRESS_ZSTD
> +       bool "ZSTD"
> +       help
> +         Compress modules with ZSTD. The installed modules are suffixed
> +         with .ko.zst.
> +
>  endchoice
>
>  config MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS
> diff --git a/scripts/Makefile.modinst b/scripts/Makefile.modinst
> index 191408f7a91a..f9fa2a3808b2 100644
> --- a/scripts/Makefile.modinst
> +++ b/scripts/Makefile.modinst
> @@ -21,6 +21,7 @@ endif
>  suffix-y                               :=
>  suffix-$(CONFIG_MODULE_COMPRESS_GZIP)  := .gz
>  suffix-$(CONFIG_MODULE_COMPRESS_XZ)    := .xz
> +suffix-$(CONFIG_MODULE_COMPRESS_ZSTD)  := .zst
>
>  modules := $(patsubst $(extmod_prefix)%, $(dst)/%$(suffix-y), $(modules))
>
> @@ -95,6 +96,8 @@ quiet_cmd_gzip = GZIP    $@
>        cmd_gzip = $(KGZIP) -n -f $<
>  quiet_cmd_xz = XZ      $@
>        cmd_xz = $(XZ) --lzma2=dict=2MiB -f $<
> +quiet_cmd_zstd = ZSTD      $@
> +      cmd_zstd = $(ZSTD) -T0 --rm -f -q $<
>
>  $(dst)/%.ko.gz: $(dst)/%.ko FORCE
>         $(call cmd,gzip)
> @@ -102,6 +105,9 @@ $(dst)/%.ko.gz: $(dst)/%.ko FORCE
>  $(dst)/%.ko.xz: $(dst)/%.ko FORCE
>         $(call cmd,xz)
>
> +$(dst)/%.ko.zst: $(dst)/%.ko FORCE
> +       $(call cmd,zstd)
> +
>  PHONY += FORCE
>  FORCE:
>
> --
> 2.31.0.97.g1424303384
>


-- 
Best Regards
Masahiro Yamada

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ