Message ID | 1449c1a24e2e06ac6c8c2e1b7f73feedfd51894c.1558445259.git.christophe.leroy@c-s.fr (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Herbert Xu |
Headers | show |
Series | Fixing selftests failure on Talitos driver | expand |
Hi Joe & Andy On 05/21/2019 01:34 PM, Christophe Leroy wrote: > The talitos driver has two ways to perform AEAD depending on the > HW capability. Some HW support both. It is needed to give them > different names to distingish which one it is for instance when > a test fails. > > Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> > Fixes: 7405c8d7ff97 ("crypto: talitos - templates for AEAD using HMAC_SNOOP_NO_AFEU") > Cc: stable@vger.kernel.org > --- > drivers/crypto/talitos.c | 16 ++++++++-------- > 1 file changed, 8 insertions(+), 8 deletions(-) > > diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c > index f443cbe7da80..6f8bc6467706 100644 > --- a/drivers/crypto/talitos.c > +++ b/drivers/crypto/talitos.c > @@ -2356,7 +2356,7 @@ static struct talitos_alg_template driver_algs[] = { > .base = { > .cra_name = "authenc(hmac(sha1),cbc(aes))", > .cra_driver_name = "authenc-hmac-sha1-" > - "cbc-aes-talitos", > + "cbc-aes-talitos-hsna", checkpatch reports the following warning on the above: WARNING: quoted string split across lines #27: FILE: drivers/crypto/talitos.c:2359: .cra_driver_name = "authenc-hmac-sha1-" + "cbc-aes-talitos-hsna", But when I fixes the patch as follows, I get another warning: @@ -2355,8 +2355,7 @@ static struct talitos_alg_template driver_algs[] = { .alg.aead = { .base = { .cra_name = "authenc(hmac(sha1),cbc(aes))", - .cra_driver_name = "authenc-hmac-sha1-" - "cbc-aes-talitos", + .cra_driver_name = "authenc-hmac-sha1-cbc-aes-talitos-hsna", .cra_blocksize = AES_BLOCK_SIZE, .cra_flags = CRYPTO_ALG_ASYNC, }, WARNING: line over 80 characters #28: FILE: drivers/crypto/talitos.c:2358: + .cra_driver_name = "authenc-hmac-sha1-cbc-aes-talitos-hsna", So, how should this be fixed ? Thanks Christophe > .cra_blocksize = AES_BLOCK_SIZE, > .cra_flags = CRYPTO_ALG_ASYNC, > }, > @@ -2401,7 +2401,7 @@ static struct talitos_alg_template driver_algs[] = { > .cra_name = "authenc(hmac(sha1)," > "cbc(des3_ede))", > .cra_driver_name = "authenc-hmac-sha1-" > - "cbc-3des-talitos", > + "cbc-3des-talitos-hsna", > .cra_blocksize = DES3_EDE_BLOCK_SIZE, > .cra_flags = CRYPTO_ALG_ASYNC, > }, > @@ -2444,7 +2444,7 @@ static struct talitos_alg_template driver_algs[] = { > .base = { > .cra_name = "authenc(hmac(sha224),cbc(aes))", > .cra_driver_name = "authenc-hmac-sha224-" > - "cbc-aes-talitos", > + "cbc-aes-talitos-hsna", > .cra_blocksize = AES_BLOCK_SIZE, > .cra_flags = CRYPTO_ALG_ASYNC, > }, > @@ -2489,7 +2489,7 @@ static struct talitos_alg_template driver_algs[] = { > .cra_name = "authenc(hmac(sha224)," > "cbc(des3_ede))", > .cra_driver_name = "authenc-hmac-sha224-" > - "cbc-3des-talitos", > + "cbc-3des-talitos-hsna", > .cra_blocksize = DES3_EDE_BLOCK_SIZE, > .cra_flags = CRYPTO_ALG_ASYNC, > }, > @@ -2532,7 +2532,7 @@ static struct talitos_alg_template driver_algs[] = { > .base = { > .cra_name = "authenc(hmac(sha256),cbc(aes))", > .cra_driver_name = "authenc-hmac-sha256-" > - "cbc-aes-talitos", > + "cbc-aes-talitos-hsna", > .cra_blocksize = AES_BLOCK_SIZE, > .cra_flags = CRYPTO_ALG_ASYNC, > }, > @@ -2577,7 +2577,7 @@ static struct talitos_alg_template driver_algs[] = { > .cra_name = "authenc(hmac(sha256)," > "cbc(des3_ede))", > .cra_driver_name = "authenc-hmac-sha256-" > - "cbc-3des-talitos", > + "cbc-3des-talitos-hsna", > .cra_blocksize = DES3_EDE_BLOCK_SIZE, > .cra_flags = CRYPTO_ALG_ASYNC, > }, > @@ -2706,7 +2706,7 @@ static struct talitos_alg_template driver_algs[] = { > .base = { > .cra_name = "authenc(hmac(md5),cbc(aes))", > .cra_driver_name = "authenc-hmac-md5-" > - "cbc-aes-talitos", > + "cbc-aes-talitos-hsna", > .cra_blocksize = AES_BLOCK_SIZE, > .cra_flags = CRYPTO_ALG_ASYNC, > }, > @@ -2749,7 +2749,7 @@ static struct talitos_alg_template driver_algs[] = { > .base = { > .cra_name = "authenc(hmac(md5),cbc(des3_ede))", > .cra_driver_name = "authenc-hmac-md5-" > - "cbc-3des-talitos", > + "cbc-3des-talitos-hsna", > .cra_blocksize = DES3_EDE_BLOCK_SIZE, > .cra_flags = CRYPTO_ALG_ASYNC, > }, >
On Tue, 2019-05-21 at 17:54 +0000, Christophe Leroy wrote: > Hi Joe & Andy [] > diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c [] > > @@ -2356,7 +2356,7 @@ static struct talitos_alg_template driver_algs[] = { > > .base = { > > .cra_name = "authenc(hmac(sha1),cbc(aes))", > > .cra_driver_name = "authenc-hmac-sha1-" > > - "cbc-aes-talitos", > > + "cbc-aes-talitos-hsna", > > checkpatch reports the following warning on the above: > > WARNING: quoted string split across lines > #27: FILE: drivers/crypto/talitos.c:2359: > .cra_driver_name = "authenc-hmac-sha1-" > + "cbc-aes-talitos-hsna", > > > But when I fixes the patch as follows, I get another warning: > > @@ -2355,8 +2355,7 @@ static struct talitos_alg_template driver_algs[] = { > .alg.aead = { > .base = { > .cra_name = "authenc(hmac(sha1),cbc(aes))", > - .cra_driver_name = "authenc-hmac-sha1-" > - "cbc-aes-talitos", > + .cra_driver_name = "authenc-hmac-sha1-cbc-aes-talitos-hsna", > .cra_blocksize = AES_BLOCK_SIZE, > .cra_flags = CRYPTO_ALG_ASYNC, > }, > > > > WARNING: line over 80 characters > #28: FILE: drivers/crypto/talitos.c:2358: > + .cra_driver_name = "authenc-hmac-sha1-cbc-aes-talitos-hsna", > > > So, how should this be fixed ? For at least now, by ignoring this checkpatch message. It's a brainless script. You are not brainless.
diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c index f443cbe7da80..6f8bc6467706 100644 --- a/drivers/crypto/talitos.c +++ b/drivers/crypto/talitos.c @@ -2356,7 +2356,7 @@ static struct talitos_alg_template driver_algs[] = { .base = { .cra_name = "authenc(hmac(sha1),cbc(aes))", .cra_driver_name = "authenc-hmac-sha1-" - "cbc-aes-talitos", + "cbc-aes-talitos-hsna", .cra_blocksize = AES_BLOCK_SIZE, .cra_flags = CRYPTO_ALG_ASYNC, }, @@ -2401,7 +2401,7 @@ static struct talitos_alg_template driver_algs[] = { .cra_name = "authenc(hmac(sha1)," "cbc(des3_ede))", .cra_driver_name = "authenc-hmac-sha1-" - "cbc-3des-talitos", + "cbc-3des-talitos-hsna", .cra_blocksize = DES3_EDE_BLOCK_SIZE, .cra_flags = CRYPTO_ALG_ASYNC, }, @@ -2444,7 +2444,7 @@ static struct talitos_alg_template driver_algs[] = { .base = { .cra_name = "authenc(hmac(sha224),cbc(aes))", .cra_driver_name = "authenc-hmac-sha224-" - "cbc-aes-talitos", + "cbc-aes-talitos-hsna", .cra_blocksize = AES_BLOCK_SIZE, .cra_flags = CRYPTO_ALG_ASYNC, }, @@ -2489,7 +2489,7 @@ static struct talitos_alg_template driver_algs[] = { .cra_name = "authenc(hmac(sha224)," "cbc(des3_ede))", .cra_driver_name = "authenc-hmac-sha224-" - "cbc-3des-talitos", + "cbc-3des-talitos-hsna", .cra_blocksize = DES3_EDE_BLOCK_SIZE, .cra_flags = CRYPTO_ALG_ASYNC, }, @@ -2532,7 +2532,7 @@ static struct talitos_alg_template driver_algs[] = { .base = { .cra_name = "authenc(hmac(sha256),cbc(aes))", .cra_driver_name = "authenc-hmac-sha256-" - "cbc-aes-talitos", + "cbc-aes-talitos-hsna", .cra_blocksize = AES_BLOCK_SIZE, .cra_flags = CRYPTO_ALG_ASYNC, }, @@ -2577,7 +2577,7 @@ static struct talitos_alg_template driver_algs[] = { .cra_name = "authenc(hmac(sha256)," "cbc(des3_ede))", .cra_driver_name = "authenc-hmac-sha256-" - "cbc-3des-talitos", + "cbc-3des-talitos-hsna", .cra_blocksize = DES3_EDE_BLOCK_SIZE, .cra_flags = CRYPTO_ALG_ASYNC, }, @@ -2706,7 +2706,7 @@ static struct talitos_alg_template driver_algs[] = { .base = { .cra_name = "authenc(hmac(md5),cbc(aes))", .cra_driver_name = "authenc-hmac-md5-" - "cbc-aes-talitos", + "cbc-aes-talitos-hsna", .cra_blocksize = AES_BLOCK_SIZE, .cra_flags = CRYPTO_ALG_ASYNC, }, @@ -2749,7 +2749,7 @@ static struct talitos_alg_template driver_algs[] = { .base = { .cra_name = "authenc(hmac(md5),cbc(des3_ede))", .cra_driver_name = "authenc-hmac-md5-" - "cbc-3des-talitos", + "cbc-3des-talitos-hsna", .cra_blocksize = DES3_EDE_BLOCK_SIZE, .cra_flags = CRYPTO_ALG_ASYNC, },
The talitos driver has two ways to perform AEAD depending on the HW capability. Some HW support both. It is needed to give them different names to distingish which one it is for instance when a test fails. Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> Fixes: 7405c8d7ff97 ("crypto: talitos - templates for AEAD using HMAC_SNOOP_NO_AFEU") Cc: stable@vger.kernel.org --- drivers/crypto/talitos.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)