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, 13 Jul 2023 00:00:17 -0700
From:   Eric Biggers <ebiggers@...nel.org>
To:     Ard Biesheuvel <ardb@...nel.org>
Cc:     linux-hardening@...r.kernel.org, Kees Cook <keescook@...omium.org>,
        "Guilherme G. Piccoli" <gpiccoli@...lia.com>
Subject: Re: [PATCH v3 2/2] pstore: Replace crypto API compression with
 zlib_deflate library calls

On Wed, Jul 12, 2023 at 06:23:32PM +0200, Ard Biesheuvel wrote:
> Pstore supports compression using a variety of algorithms exposed by the
> crypto API. This uses the deprecated comp (as opposed to scomp/acomp)
> API, and so we should stop using that, and either move to the new API,
> or switch to a different approach entirely.
> 
> Given that we only compress ASCII text in pstore, and considering that
> this happens when the system is likely to be in an unstable state, the
> flexibility that the complex crypto API provides does not outweigh its
> impact on the risk that we might encounter additional problems when
> trying to commit the kernel log contents to the pstore backend.
> 
> So let's switch [back] to the zlib deflate library API, and remove all
> the complexity that really has no place in a low-level diagnostic
> facility. Note that, while more modern compression algorithms have been
> added to the kernel in recent years, the code size of zlib deflate is
> substantially smaller than, e.g., zstd, while its performance in terms
> of compression ratio is comparable for ASCII text, and speed is deemed
> irrelevant in this context.
> 
> Note that this means that compressed pstore records may no longer be
> accessible after a kernel upgrade, but this has never been part of the
> contract. (The choice of compression algorithm is not stored in the
> pstore records either)
> 
> Tested-by: Guilherme G. Piccoli <gpiccoli@...lia.com> # Steam Deck
> Signed-off-by: Ard Biesheuvel <ardb@...nel.org>
> ---
>  fs/pstore/Kconfig    | 100 ++------------
>  fs/pstore/platform.c | 136 +++++++++++++-------
>  2 files changed, 97 insertions(+), 139 deletions(-)

Reviewed-by: Eric Biggers <ebiggers@...gle.com>

- Eric

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ