netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zhihao Cheng <chengzhihao1@huawei.com>
To: Herbert Xu <herbert@gondor.apana.org.au>,
	Linux Crypto Mailing List <linux-crypto@vger.kernel.org>
Cc: Richard Weinberger <richard@nod.at>,
	<linux-mtd@lists.infradead.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Pavel Machek <pavel@ucw.cz>, <linux-pm@vger.kernel.org>,
	Steffen Klassert <steffen.klassert@secunet.com>,
	<netdev@vger.kernel.org>
Subject: Re: [v4 PATCH 10/13] ubifs: Use crypto_acomp interface
Date: Sat, 15 Mar 2025 13:15:09 +0800	[thread overview]
Message-ID: <02dd5000-7ced-df02-d9d0-a3c1a410d062@huawei.com> (raw)
In-Reply-To: <349a78bc53d3620a29cc6105b55985db51aa0a11.1741954523.git.herbert@gondor.apana.org.au>

在 2025/3/14 20:22, Herbert Xu 写道:
> Replace the legacy crypto compression interface with the new acomp
> interface.
> 
> Remove the compression mutexes and the overallocation for memory
> (the offender LZO has been fixed).

Hi, Herbert. Can you show me which patch fixed the problem in LZO?
> 
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
> ---
>   fs/ubifs/compress.c | 116 ++++++++++++++++++++++++++++----------------
>   fs/ubifs/journal.c  |   2 +-
>   fs/ubifs/ubifs.h    |  15 +-----
>   3 files changed, 77 insertions(+), 56 deletions(-)
> 

[...]
> diff --git a/fs/ubifs/ubifs.h b/fs/ubifs/ubifs.h
> index 3375bbe0508c..7d0aaf5d2e23 100644
> --- a/fs/ubifs/ubifs.h
> +++ b/fs/ubifs/ubifs.h
> @@ -124,13 +124,6 @@
>   #define OLD_ZNODE_AGE 20
>   #define YOUNG_ZNODE_AGE 5
>   
> -/*
> - * Some compressors, like LZO, may end up with more data then the input buffer.
> - * So UBIFS always allocates larger output buffer, to be sure the compressor
> - * will not corrupt memory in case of worst case compression.
> - */
> -#define WORST_COMPR_FACTOR 2

Does LZO guarantee the output data length smaller than input buffer 
length? Which commit fixed the issue?
> -
>   #ifdef CONFIG_FS_ENCRYPTION
>   #define UBIFS_CIPHER_BLOCK_SIZE FSCRYPT_CONTENTS_ALIGNMENT
>   #else

  parent reply	other threads:[~2025-03-15  5:15 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-14 12:22 [v4 PATCH 00/13] crypto: acomp - Add virtual address and folio support Herbert Xu
2025-03-14 12:22 ` [v4 PATCH 01/13] crypto: qat - Remove dst_null support Herbert Xu
2025-03-14 12:22 ` [v4 PATCH 02/13] crypto: iaa " Herbert Xu
2025-03-14 12:22 ` [v4 PATCH 03/13] crypto: scomp - Remove support for some non-trivial SG lists Herbert Xu
2025-03-14 12:22 ` [v4 PATCH 04/13] crypto: acomp - Remove dst_free Herbert Xu
2025-03-14 12:22 ` [v4 PATCH 05/13] crypto: scomp - Add chaining and virtual address support Herbert Xu
2025-03-14 12:22 ` [v4 PATCH 06/13] crypto: acomp - Add ACOMP_REQUEST_ALLOC and acomp_request_alloc_extra Herbert Xu
2025-03-14 12:22 ` [v4 PATCH 07/13] crypto: iaa - Use acomp stack fallback Herbert Xu
2025-03-14 12:22 ` [v4 PATCH 08/13] crypto: acomp - Add async nondma fallback Herbert Xu
2025-03-14 12:22 ` [v4 PATCH 09/13] crypto: acomp - Add support for folios Herbert Xu
2025-03-14 12:22 ` [v4 PATCH 10/13] ubifs: Use crypto_acomp interface Herbert Xu
2025-03-15  3:54   ` Zhihao Cheng
2025-03-15  4:03     ` Herbert Xu
2025-03-15  5:08       ` Zhihao Cheng
2025-03-15  5:40         ` Herbert Xu
2025-03-15  5:15   ` Zhihao Cheng [this message]
2025-03-15  5:44     ` Herbert Xu
2025-03-15  8:58   ` Zhihao Cheng
2025-03-15  9:02     ` Herbert Xu
2025-03-15  9:08       ` Zhihao Cheng
2025-03-15  9:12         ` Herbert Xu
2025-03-15  9:27           ` Zhihao Cheng
2025-03-15  9:32             ` Herbert Xu
2025-03-15  9:34               ` Herbert Xu
2025-03-14 12:22 ` [v4 PATCH 11/13] ubifs: Pass folios to acomp Herbert Xu
2025-03-14 12:22 ` [v4 PATCH 12/13] PM: hibernate: Use crypto_acomp interface Herbert Xu
2025-03-14 14:40   ` Rafael J. Wysocki
2025-03-14 12:22 ` [v4 PATCH 13/13] xfrm: ipcomp: " Herbert Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=02dd5000-7ced-df02-d9d0-a3c1a410d062@huawei.com \
    --to=chengzhihao1@huawei.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=rafael@kernel.org \
    --cc=richard@nod.at \
    --cc=steffen.klassert@secunet.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).