Re: [PATCH] crypto: marvell/cesa - Avoid empty transfer descriptor

Klaus Kudielka
2025-05-16T17:36:55Z

On Fri, 2025-05-16 at 12:12 +0800, Herbert Xu wrote:
>
> Something doesn't look right.  There are zero ahash lines in your
> dmesg.  IOW all the output was from skcipher tests alone.
>
> That could explain why ahash appears to be working.
>
> What does /proc/crypto show after boot-up? Do the cesa ahash
> algorithms show up as tested in there?
>
> Cheers,

Plain cryptodev tree, marvell-cesa as module.
Directly after boot, only the builtin crc32c-generic shows up.
After loading the module, the marvell-cesa ahash show up with "selftest : passed".
But whether they REALLY were tested, I can't say.

# cat /proc/crypto
name : crc32c
driver : crc32c-generic
module : kernel
priority : 100
refcnt : 1
selftest : passed
internal : no
type : shash
blocksize : 1
digestsize : 4

# modprobe marvell-cesa
# cat /proc/crypto
name : hmac(sha256)
driver : mv-hmac-sha256
module : marvell_cesa
priority : 0
refcnt : 1
selftest : passed
internal : no
type : ahash
async : yes
blocksize : 64
digestsize : 32

name : hmac(sha1)
driver : mv-hmac-sha1
module : marvell_cesa
priority : 0
refcnt : 1
selftest : passed
internal : no
type : ahash
async : yes
blocksize : 64
digestsize : 20

name : hmac(md5)
driver : mv-hmac-md5
module : marvell_cesa
priority : 0
refcnt : 1
selftest : passed
internal : no
type : ahash
async : yes
blocksize : 64
digestsize : 16

name : sha256
driver : mv-sha256
module : marvell_cesa
priority : 0
refcnt : 1
selftest : passed
internal : no
type : ahash
async : yes
blocksize : 64
digestsize : 32

name : sha1
driver : mv-sha1
module : marvell_cesa
priority : 0
refcnt : 1
selftest : passed
internal : no
type : ahash
async : yes
blocksize : 64
digestsize : 20

name : md5
driver : mv-md5
module : marvell_cesa
priority : 0
refcnt : 1
selftest : passed
internal : no
type : ahash
async : yes
blocksize : 64
digestsize : 16

name : cbc(aes)
driver : mv-cbc-aes
module : marvell_cesa
priority : 300
refcnt : 1
selftest : passed
internal : no
type : skcipher
async : yes
blocksize : 16
min keysize : 16
max keysize : 32
ivsize : 16
chunksize : 16
walksize : 16
statesize : 0

name : ecb(aes)
driver : mv-ecb-aes
module : marvell_cesa
priority : 300
refcnt : 1
selftest : passed
internal : no
type : skcipher
async : yes
blocksize : 16
min keysize : 16
max keysize : 32
ivsize : 0
chunksize : 16
walksize : 16
statesize : 0

name : cbc(des3_ede)
driver : mv-cbc-des3-ede
module : marvell_cesa
priority : 300
refcnt : 1
selftest : passed
internal : no
type : skcipher
async : yes
blocksize : 8
min keysize : 24
max keysize : 24
ivsize : 8
chunksize : 8
walksize : 8
statesize : 0

name : ecb(des3_ede)
driver : mv-ecb-des3-ede
module : marvell_cesa
priority : 300
refcnt : 1
selftest : passed
internal : no
type : skcipher
async : yes
blocksize : 8
min keysize : 24
max keysize : 24
ivsize : 0
chunksize : 8
walksize : 8
statesize : 0

name : cbc(des)
driver : mv-cbc-des
module : marvell_cesa
priority : 300
refcnt : 1
selftest : passed
internal : no
type : skcipher
async : yes
blocksize : 8
min keysize : 8
max keysize : 8
ivsize : 8
chunksize : 8
walksize : 8
statesize : 0

name : ecb(des)
driver : mv-ecb-des
module : marvell_cesa
priority : 300
refcnt : 1
selftest : passed
internal : no
type : skcipher
async : yes
blocksize : 8
min keysize : 8
max keysize : 8
ivsize : 0
chunksize : 8
walksize : 8
statesize : 0

name : crc32c
driver : crc32c-generic
module : kernel
priority : 100
refcnt : 1
selftest : passed
internal : no
type : shash
blocksize : 1
digestsize : 4

# dmesg | tail
[ 4.883366] mv88e6085 f1072004.mdio-mii:10 lan2: configuring for phy/gmii link mode
[ 4.884517] br0: port 3(lan4) entered blocking state
[ 4.884527] br0: port 3(lan4) entered forwarding state
[ 88.867746] marvell-cesa f1090000.crypto: CESA device successfully registered
[ 89.034292] alg: skcipher: skipping comparison tests for mv-cbc-des because cbc(des-generic) is unavailable
[ 89.045265] alg: skcipher: skipping comparison tests for mv-cbc-des3-ede because cbc(des3_ede-generic) is unavailable
[ 89.052456] alg: skcipher: skipping comparison tests for mv-cbc-aes because cbc(aes-generic) is unavailable
[ 89.099763] alg: skcipher: skipping comparison tests for mv-ecb-aes because ecb(aes-generic) is unavailable
[ 89.099819] alg: skcipher: skipping comparison tests for mv-ecb-des3-ede because ecb(des3_ede-generic) is unavailable
[ 89.099908] alg: skcipher: skipping comparison tests for mv-ecb-des because ecb(des-generic) is unavailable