From: Christophe Leroy <christophe.leroy@c-s.fr>
To: Horia Geanta <horia.geanta@nxp.com>,
Herbert Xu <herbert@gondor.apana.org.au>,
"David S. Miller" <davem@davemloft.net>
Cc: "linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
"linux-crypto@vger.kernel.org" <linux-crypto@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 0/4] Additional fixes on Talitos driver
Date: Thu, 13 Jun 2019 06:57:45 +0200 [thread overview]
Message-ID: <bbfc8706-129b-b441-796a-af4ef54aba53@c-s.fr> (raw)
In-Reply-To: <VI1PR0402MB348583D36921F9DEC4E0DA2698EC0@VI1PR0402MB3485.eurprd04.prod.outlook.com>
Le 12/06/2019 à 15:59, Horia Geanta a écrit :
> On 6/12/2019 8:52 AM, Christophe Leroy wrote:
>>
>>
>> Le 11/06/2019 à 18:30, Horia Geanta a écrit :
>>> On 6/11/2019 6:40 PM, Christophe Leroy wrote:
>>>>
>>>>
>>>> Le 11/06/2019 à 17:37, Horia Geanta a écrit :
>>>>> On 6/11/2019 5:39 PM, Christophe Leroy wrote:
>>>>>> This series is the last set of fixes for the Talitos driver.
>>>>>>
>>>>>> We now get a fully clean boot on both SEC1 (SEC1.2 on mpc885) and
>>>>>> SEC2 (SEC2.2 on mpc8321E) with CONFIG_CRYPTO_MANAGER_EXTRA_TESTS:
>>>>>>
>>>>> I am getting below failures on a sec 3.3.2 (p1020rdb) for hmac(sha384) and
>>>>> hmac(sha512):
>>>>
>>>> Is that new with this series or did you already have it before ?
>>>>
>>> Looks like this happens with or without this series.
>>
>> Found the issue, that's in
>> https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=b8fbdc2bc4e71b62646031d5df5f08aafe15d5ad
>>
>> CONFIG_CRYPTO_DEV_TALITOS_SEC2 should be CONFIG_CRYPTO_DEV_TALITOS2 instead.
>>
>> Just sent a patch to fix it.
>>
> Thanks, I've tested it and the hmac failures go away.
>
> However, testing gets stuck.
> Seems there is another issue lurking in the driver.
>
> Used cryptodev-2.6/master with the following on top:
> crypto: testmgr - add some more preemption points
> https://patchwork.kernel.org/patch/10972337/
> crypto: talitos - fix max key size for sha384 and sha512
> https://patchwork.kernel.org/patch/10988473/
>
> [...]
> alg: skcipher: skipping comparison tests for ecb-3des-talitos because ecb(des3_ede-generic) is unavailable
> INFO: task cryptomgr_test:314 blocked for more than 120 seconds.
> Not tainted 5.2.0-rc1-g905bfd415e8a #1
> "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
> cryptomgr_test D 0 314 2 0x00000800
> Call Trace:
> [e78337e0] [00000004] 0x4 (unreliable)
> [e78338a8] [c08a6e5c] __schedule+0x20c/0x4d4
> [e78338f8] [c08a7158] schedule+0x34/0xc8
> [e7833908] [c08aa5ec] schedule_timeout+0x1d4/0x350
> [e7833958] [c08a7be4] wait_for_common+0xa0/0x164
> [e7833998] [c03a7b14] do_ahash_op+0xa4/0xc4
> [e78339b8] [c03aba00] test_ahash_vec_cfg+0x188/0x5e4
> [e7833aa8] [c03ac1c8] test_hash_vs_generic_impl+0x1b0/0x2b4
> [e7833de8] [c03ac498] __alg_test_hash+0x1cc/0x2d0
> [e7833e28] [c03a9fb4] alg_test.part.37+0x8c/0x3ac
> [e7833ef8] [c03a54d0] cryptomgr_test+0x4c/0x54
> [e7833f08] [c006c410] kthread+0xf8/0x124
> [e7833f38] [c001227c] ret_from_kernel_thread+0x14/0x1c
>
> addr2line on c03aba00 points to crypto/testmgr.c:1335
>
> 1327) if (cfg->finalization_type == FINALIZATION_TYPE_DIGEST ||
> 1328) vec->digest_error) {
> 1329) /* Just using digest() */
> 1330) ahash_request_set_callback(req, req_flags, crypto_req_done,
> 1331) &wait);
> 1332) ahash_request_set_crypt(req, tsgl->sgl, result, vec->psize);
> 1333) err = do_ahash_op(crypto_ahash_digest, req, &wait, cfg->nosimd);
> 1334) if (err) {
> -> 1335) if (err == vec->digest_error)
> 1336) return 0;
> 1337) pr_err("alg: ahash: %s digest() failed on test vector %s; expected_error=%d, actual_error=%d, cfg=\"%s\"\n",
> 1338) driver, vec_name, vec->digest_error, err,
> 1339) cfg->name);
> 1340) return err;
> 1341) }
> 1342) if (vec->digest_error) {
> 1343) pr_err("alg: ahash: %s digest() unexpectedly succeeded on test vector %s; expected_error=%d, cfg=\"%s\"\n",
> 1344) driver, vec_name, vec->digest_error, cfg->name);
> 1345) return -EINVAL;
> 1346) }
> 1347) goto result_ready;
> 1348) }
>
> Seems that for some reason driver does not receive the interrupt from HW,
> thus completion callback does not run.
>
> Tried with or without current patch series, no change in behaviour.
>
> If you cannot reproduce and don't have any idea, I'll try the hard way
> (git bisect).
I cannot reproduce, both mpc885 and mpc8321e boot fine, and don't have
any idea at first.
I know the SEC1 behaves that way when you submit zero-length data.
Christophe
>
> Thanks,
> Horia
>
prev parent reply other threads:[~2019-06-13 4:59 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-11 14:39 [PATCH v2 0/4] Additional fixes on Talitos driver Christophe Leroy
2019-06-11 14:39 ` [PATCH v2 1/4] crypto: talitos - move struct talitos_edesc into talitos.h Christophe Leroy
2019-06-13 12:13 ` Horia Geanta
2019-06-13 12:16 ` Christophe Leroy
2019-06-13 12:24 ` Horia Geanta
2019-06-13 12:32 ` Christophe Leroy
2019-06-13 12:39 ` Horia Geanta
2019-06-13 12:50 ` Christophe Leroy
2019-06-11 14:39 ` [PATCH v2 2/4] crypto: talitos - fix hash on SEC1 Christophe Leroy
2019-06-11 14:39 ` [PATCH v2 3/4] crypto: talitos - eliminate unneeded 'done' functions at build time Christophe Leroy
2019-06-13 12:16 ` Horia Geanta
2019-06-11 14:39 ` [PATCH v2 4/4] crypto: talitos - drop icv_ool Christophe Leroy
2019-06-13 12:21 ` Horia Geanta
2019-06-13 12:28 ` Christophe Leroy
2019-06-13 13:09 ` Herbert Xu
2019-06-11 15:37 ` [PATCH v2 0/4] Additional fixes on Talitos driver Horia Geanta
2019-06-11 15:40 ` Christophe Leroy
2019-06-11 16:30 ` Horia Geanta
2019-06-11 17:16 ` Christophe Leroy
2019-06-12 5:52 ` Christophe Leroy
2019-06-12 13:59 ` Horia Geanta
2019-06-13 4:57 ` Christophe Leroy [this message]
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=bbfc8706-129b-b441-796a-af4ef54aba53@c-s.fr \
--to=christophe.leroy@c-s.fr \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=horia.geanta@nxp.com \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
/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