public inbox for linux-crypto@vger.kernel.org
 help / color / mirror / Atom feed
From: Klaus Kudielka <klaus.kudielka@gmail.com>
To: Herbert Xu <herbert@gondor.apana.org.au>,
	Corentin Labbe <clabbe.montjoie@gmail.com>
Cc: regressions@lists.linux.dev, linux-kernel@vger.kernel.org,
	Linux Crypto Mailing List <linux-crypto@vger.kernel.org>,
	Boris Brezillon <bbrezillon@kernel.org>,
	EBALARD Arnaud	 <Arnaud.Ebalard@ssi.gouv.fr>,
	Romain Perier <romain.perier@gmail.com>
Subject: Re: [v3 PATCH] crypto: marvell/cesa - Do not chain submitted requests
Date: Sat, 10 May 2025 10:32:53 +0200	[thread overview]
Message-ID: <dd55ba91a5aebce0e643cab5d57e4c87a006600f.camel@gmail.com> (raw)
In-Reply-To: <aBw_iC_4okpiKglQ@gondor.apana.org.au>

On Thu, 2025-05-08 at 13:22 +0800, Herbert Xu wrote:
> v3 simplifies it a little bit:
>  
> ---8<---
> This driver tries to chain requests together before submitting them
> to hardware in order to reduce completion interrupts.
> 
> However, it even extends chains that have already been submitted
> to hardware.  This is dangerous because there is no way of knowing
> whether the hardware has already read the DMA memory in question
> or not.
> 
> Fix this by splitting the chain list into two.  One for submitted
> requests and one for requests that have not yet been submitted.
> Only extend the latter.
> 
> Reported-by: Klaus Kudielka <klaus.kudielka@gmail.com>
> Fixes: 85030c5168f1 ("crypto: marvell - Add support for chaining crypto requests in TDMA mode")
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>


[...]


So, I am back at the hardware (armada-385-turris-omnia), and gave this patch a try.
CONFIG_CRYPTO_DEV_MARVELL_CESA=m

Upon modprobe marvell-cesa, I get the following results.



v6.15-rc5, unmodified
=====================

[   73.061653] marvell-cesa f1090000.crypto: CESA device successfully registered
[   73.115082] alg: ahash: mv-hmac-sha1 test failed (wrong result) on test vector 2, cfg="import/export"
[   73.115206] alg: ahash: mv-hmac-md5 test failed (wrong result) on test vector 6, cfg="init+update+update+final two even splits"
[   73.124364] alg: self-tests for hmac(sha1) using mv-hmac-sha1 failed (rc=-22)
[   73.135887] alg: self-tests for hmac(md5) using mv-hmac-md5 failed (rc=-22)
[   73.135893] ------------[ cut here ]------------
[   73.135902] ------------[ cut here ]------------
[   73.135896] WARNING: CPU: 0 PID: 394 at crypto/testmgr.c:5871 alg_test+0x5f0/0x614
[   73.135906] WARNING: CPU: 1 PID: 397 at crypto/testmgr.c:5871 alg_test+0x5f0/0x614
[   73.135911] alg: self-tests for hmac(md5) using mv-hmac-md5 failed (rc=-22)
[   73.135914] Modules linked in: marvell_cesa
[   73.135918] alg: self-tests for hmac(sha1) using mv-hmac-sha1 failed (rc=-22)
[   73.135921]  libdes
[   73.135922] Modules linked in:
[   73.135924]  libaes
[   73.135925]  marvell_cesa libdes

[   73.135929]  libaes
[   73.135932] CPU: 0 UID: 0 PID: 394 Comm: cryptomgr_test Not tainted 6.15.0-rc5 #3 NONE 
[   73.135940] Hardware name: Marvell Armada 380/385 (Device Tree)
[   73.135943] Call trace: 
[   73.135948]  unwind_backtrace from show_stack+0x10/0x14
[   73.135963]  show_stack from dump_stack_lvl+0x50/0x64
[   73.135973]  dump_stack_lvl from __warn+0x7c/0xd4
[   73.135982]  __warn from warn_slowpath_fmt+0x110/0x16c
[   73.135994]  warn_slowpath_fmt from alg_test+0x5f0/0x614
[   73.136004]  alg_test from cryptomgr_test+0x18/0x38
[   73.136011]  cryptomgr_test from kthread+0xe8/0x204
[   73.136021]  kthread from ret_from_fork+0x14/0x28
[   73.136028] Exception stack(0xf0ac1fb0 to 0xf0ac1ff8)
[   73.136033] 1fa0:                                     00000000 00000000 00000000 00000000
[   73.136038] 1fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[   73.136042] 1fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[   73.136045] ---[ end trace 0000000000000000 ]---
[   73.136046] CPU: 1 UID: 0 PID: 397 Comm: cryptomgr_test Not tainted 6.15.0-rc5 #3 NONE 
[   73.136052] Hardware name: Marvell Armada 380/385 (Device Tree)
[   73.136055] Call trace: 
[   73.136057]  unwind_backtrace from show_stack+0x10/0x14
[   73.136070]  show_stack from dump_stack_lvl+0x50/0x64
[   73.136079]  dump_stack_lvl from __warn+0x7c/0xd4
[   73.136087]  __warn from warn_slowpath_fmt+0x110/0x16c
[   73.136098]  warn_slowpath_fmt from alg_test+0x5f0/0x614
[   73.136108]  alg_test from cryptomgr_test+0x18/0x38
[   73.136115]  cryptomgr_test from kthread+0xe8/0x204
[   73.136123]  kthread from ret_from_fork+0x14/0x28
[   73.136130] Exception stack(0xf0ac9fb0 to 0xf0ac9ff8)
[   73.136135] 9fa0:                                     00000000 00000000 00000000 00000000
[   73.136140] 9fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[   73.136144] 9fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[   73.136147] ---[ end trace 0000000000000000 ]---
[   73.137628] alg: ahash: mv-hmac-sha256 test failed (wrong result) on test vector 0, cfg="init+update+final aligned buffer"
[   73.148747] alg: self-tests for hmac(sha256) using mv-hmac-sha256 failed (rc=-22)
[   73.148755] ------------[ cut here ]------------
[   73.148760] WARNING: CPU: 0 PID: 399 at crypto/testmgr.c:5871 alg_test+0x5f0/0x614
[   73.148783] alg: self-tests for hmac(sha256) using mv-hmac-sha256 failed (rc=-22)
[   73.148791] Modules linked in: marvell_cesa libdes libaes
[   73.148827] CPU: 0 UID: 0 PID: 399 Comm: cryptomgr_test Tainted: G        W           6.15.0-rc5 #3 NONE 
[   73.148840] Tainted: [W]=WARN
[   73.148842] Hardware name: Marvell Armada 380/385 (Device Tree)
[   73.148847] Call trace: 
[   73.148854]  unwind_backtrace from show_stack+0x10/0x14
[   73.148878]  show_stack from dump_stack_lvl+0x50/0x64
[   73.148893]  dump_stack_lvl from __warn+0x7c/0xd4
[   73.148912]  __warn from warn_slowpath_fmt+0x110/0x16c
[   73.148929]  warn_slowpath_fmt from alg_test+0x5f0/0x614
[   73.148951]  alg_test from cryptomgr_test+0x18/0x38
[   73.148960]  cryptomgr_test from kthread+0xe8/0x204
[   73.148970]  kthread from ret_from_fork+0x14/0x28
[   73.148977] Exception stack(0xf0addfb0 to 0xf0addff8)
[   73.148982] dfa0:                                     00000000 00000000 00000000 00000000
[   73.148987] dfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[   73.148991] dfe0: 00000000 00000000 00000000 00000000 00000013 00000000
[   73.148994] ---[ end trace 0000000000000000 ]---



v6.15-rc5, with the v3 PATCH
============================

[   28.374751] marvell-cesa f1090000.crypto: CESA device successfully registered
[   28.427503] alg: ahash: mv-hmac-sha1 test failed (wrong result) on test vector 0, cfg="init+update+final misaligned buffer"
[   28.427520] alg: ahash: mv-hmac-sha256 test failed (wrong result) on test vector 2, cfg="init+update+update+final two even splits"
[   28.438688] alg: self-tests for hmac(sha1) using mv-hmac-sha1 failed (rc=-22)
[   28.438693] ------------[ cut here ]------------
[   28.438695] WARNING: CPU: 1 PID: 392 at crypto/testmgr.c:5871 alg_test+0x5f0/0x614
[   28.450482] alg: self-tests for hmac(sha1) using mv-hmac-sha1 failed (rc=-22)
[   28.450486] Modules linked in:
[   28.450485] alg: self-tests for hmac(sha256) using mv-hmac-sha256 failed (rc=-22)
[   28.450489] ------------[ cut here ]------------
[   28.450490]  marvell_cesa libdes libaes
[   28.450494] WARNING: CPU: 0 PID: 395 at crypto/testmgr.c:5871 alg_test+0x5f0/0x614
[   28.450504] alg: self-tests for hmac(sha256) using mv-hmac-sha256 failed (rc=-22)
[   28.450502] CPU: 1 UID: 0 PID: 392 Comm: cryptomgr_test Not tainted 6.15.0-rc5+ #4 NONE 
[   28.450508] Modules linked in:
[   28.450510] Hardware name: Marvell Armada 380/385 (Device Tree)
[   28.450511]  marvell_cesa
[   28.450513] Call trace: 
[   28.450514]  libdes libaes
[   28.450519]  unwind_backtrace from show_stack+0x10/0x14
[   28.450534]  show_stack from dump_stack_lvl+0x50/0x64
[   28.450544]  dump_stack_lvl from __warn+0x7c/0xd4
[   28.450554]  __warn from warn_slowpath_fmt+0x110/0x16c
[   28.450565]  warn_slowpath_fmt from alg_test+0x5f0/0x614
[   28.450575]  alg_test from cryptomgr_test+0x18/0x38
[   28.450582]  cryptomgr_test from kthread+0xe8/0x204
[   28.450592]  kthread from ret_from_fork+0x14/0x28
[   28.450599] Exception stack(0xf0b09fb0 to 0xf0b09ff8)
[   28.450604] 9fa0:                                     00000000 00000000 00000000 00000000
[   28.450609] 9fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[   28.450613] 9fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[   28.450616] ---[ end trace 0000000000000000 ]---
[   28.450617] CPU: 0 UID: 0 PID: 395 Comm: cryptomgr_test Not tainted 6.15.0-rc5+ #4 NONE 
[   28.450624] Hardware name: Marvell Armada 380/385 (Device Tree)
[   28.450626] Call trace: 
[   28.450628]  unwind_backtrace from show_stack+0x10/0x14
[   28.450640]  show_stack from dump_stack_lvl+0x50/0x64
[   28.450650]  dump_stack_lvl from __warn+0x7c/0xd4
[   28.450658]  __warn from warn_slowpath_fmt+0x110/0x16c
[   28.450669]  warn_slowpath_fmt from alg_test+0x5f0/0x614
[   28.450679]  alg_test from cryptomgr_test+0x18/0x38
[   28.450686]  cryptomgr_test from kthread+0xe8/0x204
[   28.450694]  kthread from ret_from_fork+0x14/0x28
[   28.450701] Exception stack(0xf0aa9fb0 to 0xf0aa9ff8)
[   28.450706] 9fa0:                                     00000000 00000000 00000000 00000000
[   28.450711] 9fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[   28.450716] 9fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[   28.450718] ---[ end trace 0000000000000000 ]---
[   28.454686] alg: ahash: mv-md5 test failed (wrong result) on test vector 1, cfg="init+update+final aligned buffer"
[   28.465109] alg: self-tests for md5 using mv-md5 failed (rc=-22)
[   28.465120] ------------[ cut here ]------------
[   28.465125] WARNING: CPU: 1 PID: 385 at crypto/testmgr.c:5871 alg_test+0x5f0/0x614
[   28.465140] alg: self-tests for md5 using mv-md5 failed (rc=-22)
[   28.465143] Modules linked in: marvell_cesa libdes libaes
[   28.465172] CPU: 1 UID: 0 PID: 385 Comm: cryptomgr_test Tainted: G        W           6.15.0-rc5+ #4 NONE 
[   28.465181] Tainted: [W]=WARN
[   28.465183] Hardware name: Marvell Armada 380/385 (Device Tree)
[   28.465186] Call trace: 
[   28.465190]  unwind_backtrace from show_stack+0x10/0x14
[   28.465205]  show_stack from dump_stack_lvl+0x50/0x64
[   28.465215]  dump_stack_lvl from __warn+0x7c/0xd4
[   28.465224]  __warn from warn_slowpath_fmt+0x110/0x16c
[   28.465235]  warn_slowpath_fmt from alg_test+0x5f0/0x614
[   28.465246]  alg_test from cryptomgr_test+0x18/0x38
[   28.465253]  cryptomgr_test from kthread+0xe8/0x204
[   28.465262]  kthread from ret_from_fork+0x14/0x28
[   28.465270] Exception stack(0xf0ae9fb0 to 0xf0ae9ff8)
[   28.465275] 9fa0:                                     00000000 00000000 00000000 00000000
[   28.465280] 9fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[   28.465284] 9fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[   28.465287] ---[ end trace 0000000000000000 ]---
[   28.465317] alg: ahash: mv-hmac-md5 setkey failed on test vector 0; expected_error=0, actual_error=-80, flags=0x1
[   28.475674] alg: self-tests for hmac(md5) using mv-hmac-md5 failed (rc=-80)
[   28.475685] ------------[ cut here ]------------
[   28.475694] WARNING: CPU: 0 PID: 390 at crypto/testmgr.c:5871 alg_test+0x5f0/0x614
[   28.475716] alg: self-tests for hmac(md5) using mv-hmac-md5 failed (rc=-80)
[   28.475724] Modules linked in: marvell_cesa libdes libaes
[   28.475752] CPU: 0 UID: 0 PID: 390 Comm: cryptomgr_test Tainted: G        W           6.15.0-rc5+ #4 NONE 
[   28.475770] Tainted: [W]=WARN
[   28.475772] Hardware name: Marvell Armada 380/385 (Device Tree)
[   28.475774] Call trace: 
[   28.475780]  unwind_backtrace from show_stack+0x10/0x14
[   28.475799]  show_stack from dump_stack_lvl+0x50/0x64
[   28.475818]  dump_stack_lvl from __warn+0x7c/0xd4
[   28.475831]  __warn from warn_slowpath_fmt+0x110/0x16c
[   28.475853]  warn_slowpath_fmt from alg_test+0x5f0/0x614
[   28.475865]  alg_test from cryptomgr_test+0x18/0x38
[   28.475872]  cryptomgr_test from kthread+0xe8/0x204
[   28.475881]  kthread from ret_from_fork+0x14/0x28
[   28.475888] Exception stack(0xf0b05fb0 to 0xf0b05ff8)
[   28.475893] 5fa0:                                     00000000 00000000 00000000 00000000
[   28.475897] 5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[   28.475902] 5fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[   28.475904] ---[ end trace 0000000000000000 ]---


  parent reply	other threads:[~2025-05-10  8:32 UTC|newest]

Thread overview: 77+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <ef7c7a96a73161e0f5061503242a8d3eddef121f.camel@gmail.com>
2024-10-06  9:11 ` [REGRESSION] alg: ahash: Several tests fail during boot on Turris Omnia Herbert Xu
2024-10-06  9:23   ` Klaus Kudielka
2024-10-07  8:27     ` Herbert Xu
2024-10-07 20:57       ` Klaus Kudielka
2024-10-09  8:34         ` Herbert Xu
2024-10-09  8:38           ` [PATCH] crypto: marvell/cesa - Disable hash algorithms Herbert Xu
2024-10-09 16:48           ` [REGRESSION] alg: ahash: Several tests fail during boot on Turris Omnia Klaus Kudielka
2024-10-10  6:05             ` Herbert Xu
2024-10-10  8:24               ` Herbert Xu
2024-10-10 17:35                 ` Klaus Kudielka
2024-10-15  4:52                   ` Herbert Xu
2024-10-15 17:38                     ` Klaus Kudielka
2024-10-16  4:27                       ` Herbert Xu
2024-10-16  5:51                         ` Klaus Kudielka
2024-10-16  9:53                           ` Herbert Xu
2024-11-12 19:33                             ` Klaus Kudielka
2024-11-13  9:57                               ` Thorsten Leemhuis
2025-05-06 13:19                         ` Herbert Xu
2025-05-07  8:43                           ` [PATCH] crypto: marvell/cesa - Do not chain submitted requests Herbert Xu
2025-05-07 15:16                             ` Corentin Labbe
2025-05-08  5:15                               ` [v2 PATCH] " Herbert Xu
2025-05-08  5:22                                 ` [v3 " Herbert Xu
2025-05-08 12:53                                   ` Corentin Labbe
2025-05-08 13:10                                     ` Herbert Xu
2025-05-08 13:43                                       ` Corentin Labbe
2025-05-09  3:13                                         ` Herbert Xu
2025-05-09  3:19                                         ` Herbert Xu
2025-05-09  8:11                                           ` Herbert Xu
2025-05-09 11:01                                             ` Corentin Labbe
2025-05-10  1:15                                               ` Herbert Xu
2025-05-10  1:37                                                 ` Herbert Xu
2025-05-10  1:44                                                   ` Herbert Xu
2025-05-10 10:41                                         ` [PATCH] crypto: marvell/cesa - Handle zero-length skcipher requests Herbert Xu
2025-05-10  8:32                                   ` Klaus Kudielka [this message]
2025-05-10  9:05                                     ` [v3 PATCH] crypto: marvell/cesa - Do not chain submitted requests Herbert Xu
2025-05-10  9:38                                       ` Klaus Kudielka
2025-05-10 10:19                                         ` Herbert Xu
2025-05-10 10:43                                         ` [PATCH] crypto: marvell/cesa - Avoid empty transfer descriptor Herbert Xu
2025-05-10 11:14                                           ` Corentin Labbe
2025-05-10 11:39                                             ` Herbert Xu
2025-05-10 13:02                                             ` Herbert Xu
2025-05-10 15:07                                           ` Klaus Kudielka
2025-05-11  3:22                                             ` Herbert Xu
2025-05-11 16:39                                               ` Klaus Kudielka
2025-05-13  9:20                                                 ` Herbert Xu
2025-05-14  5:12                                                   ` Klaus Kudielka
2025-05-14  5:14                                                     ` Herbert Xu
2025-05-15 17:53                                                       ` Klaus Kudielka
2025-05-15 18:21                                                         ` Eric Biggers
2025-05-15 18:45                                                           ` Klaus Kudielka
2025-05-15 23:25                                                             ` Herbert Xu
2025-05-16 12:41                                                               ` Corentin Labbe
2025-05-16 12:45                                                                 ` Herbert Xu
2025-05-17 11:24                                                                   ` Corentin Labbe
2025-05-18  7:58                                                                     ` Herbert Xu
2025-05-21  5:06                                                                       ` Herbert Xu
2025-05-21  9:16                                                                         ` Herbert Xu
2025-05-21  9:58                                                                           ` Arnd Bergmann
2025-05-21 10:24                                                                             ` Herbert Xu
2025-05-21 11:36                                                                               ` Arnd Bergmann
2025-05-22  3:13                                                                                 ` Herbert Xu
2025-05-22 20:08                                                                                 ` Corentin Labbe
2025-05-21 10:45                                                                           ` Corentin Labbe
2025-05-21 10:56                                                                             ` Herbert Xu
2025-05-21 13:58                                                                               ` Corentin Labbe
2025-05-22  3:01                                                                                 ` crypto: marvell/cesa - dma_alloc_coherent broken but kmalloc + dma_map_single works Herbert Xu
2025-05-22  7:38                                                                                   ` Herbert Xu
2025-05-22 20:07                                                                                     ` Corentin Labbe
2025-05-23 11:46                                                                                       ` Herbert Xu
2025-05-28  9:58                                                                                       ` Herbert Xu
2025-05-29 11:17                                                                                         ` Corentin Labbe
2025-05-22 11:13                                                                                   ` Herbert Xu
2025-05-16  4:12                                                         ` [PATCH] crypto: marvell/cesa - Avoid empty transfer descriptor Herbert Xu
2025-05-16 17:36                                                           ` Klaus Kudielka
2025-06-17  5:32                                                             ` Klaus Kudielka
2025-06-17  5:36                                                               ` Herbert Xu
2025-05-08 12:49                                 ` [v2 PATCH] crypto: marvell/cesa - Do not chain submitted requests Corentin Labbe

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=dd55ba91a5aebce0e643cab5d57e4c87a006600f.camel@gmail.com \
    --to=klaus.kudielka@gmail.com \
    --cc=Arnaud.Ebalard@ssi.gouv.fr \
    --cc=bbrezillon@kernel.org \
    --cc=clabbe.montjoie@gmail.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=regressions@lists.linux.dev \
    --cc=romain.perier@gmail.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