mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nicolas Toromanoff <nicolas.toromanoff@foss.st.com>
To: Ard Biesheuvel <ardb@kernel.org>
Cc: Nicolas Toromanoff <nicolas.toromanoff@foss.st.com>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	"David S . Miller" <davem@davemloft.net>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	Alexandre Torgue <alexandre.torgue@foss.st.com>,
	Marek Vasut <marex@denx.de>,
	Linux Crypto Mailing List <linux-crypto@vger.kernel.org>,
	<linux-stm32@st-md-mailman.stormreply.com>,
	Linux ARM <linux-arm-kernel@lists.infradead.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 3/8] crypto: stm32/cryp - fix CTR counter carry
Date: Tue, 2 Nov 2021 12:12:20 +0100	[thread overview]
Message-ID: <alpine.DEB.2.21.2111020907550.20378@gnbcxd0088.gnb.st.com> (raw)
In-Reply-To: <CAMj1kXF5_2AnQH8pjgzbeq63iSkdkUVq3wZM_NURotoHj0sJMw@mail.gmail.com>



On Sun, 31 Oct 2021, Ard Biesheuvel wrote:

> On Fri, 29 Oct 2021 at 16:01, Nicolas Toromanoff
> <nicolas.toromanoff@foss.st.com> wrote:
>>
>> [...]
>>
>> @@ -1219,25 +1219,26 @@ static void stm32_cryp_check_ctr_counter(struct stm32_cryp *cryp)
>>
>>         if (unlikely(cryp->last_ctr[3] == 0xFFFFFFFF)) {
>>                 cryp->last_ctr[3] = 0;
>> -               cryp->last_ctr[2]++;
>> +               cryp->last_ctr[2] = cpu_to_be32(be32_to_cpu(cryp->last_ctr[2]) + 1);
>>                 if (!cryp->last_ctr[2]) {
>> -                       cryp->last_ctr[1]++;
>> +                       cryp->last_ctr[1] = cpu_to_be32(be32_to_cpu(cryp->last_ctr[1]) + 1);
>>                         if (!cryp->last_ctr[1])
>> -                               cryp->last_ctr[0]++;
>> +                               cryp->last_ctr[0] = cpu_to_be32(be32_to_cpu(cryp->last_ctr[0]) + 1);
>>                 }
>>
>
> crypto_inc() ??

Good point, I didn't know/find this function.

Thanks,
Nicolas.

  reply	other threads:[~2021-11-02 11:12 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-29 13:54 [PATCH 0/8] STM32 CRYP driver: many fixes Nicolas Toromanoff
2021-10-29 13:54 ` [PATCH 1/8] crypto: stm32/cryp - defer probe for reset controller Nicolas Toromanoff
2021-10-29 13:54 ` [PATCH 2/8] crypto: stm32/cryp - don't print error on probe deferral Nicolas Toromanoff
2021-10-29 13:54 ` [PATCH 3/8] crypto: stm32/cryp - fix CTR counter carry Nicolas Toromanoff
2021-10-31 12:28   ` Ard Biesheuvel
2021-11-02 11:12     ` Nicolas Toromanoff [this message]
2021-10-29 13:54 ` [PATCH 4/8] crypto: stm32/cryp - fix race condition Nicolas Toromanoff
2021-10-29 14:23   ` Marek Vasut
2021-10-29 15:21     ` Nicolas Toromanoff
2021-10-29 16:48       ` Marek Vasut
2021-10-29 13:54 ` [PATCH 5/8] crypto: stm32/cryp - check early input data Nicolas Toromanoff
2021-10-29 13:54 ` [PATCH 6/8] crypto: stm32/cryp - fix double pm exit Nicolas Toromanoff
2021-10-29 13:54 ` [PATCH 7/8] crypto: stm32/cryp - fix bugs and crash in tests Nicolas Toromanoff
2021-10-29 13:54 ` [PATCH 8/8] crypto: stm32/cryp - reorder hw initialization Nicolas Toromanoff

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=alpine.DEB.2.21.2111020907550.20378@gnbcxd0088.gnb.st.com \
    --to=nicolas.toromanoff@foss.st.com \
    --cc=alexandre.torgue@foss.st.com \
    --cc=ardb@kernel.org \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=marex@denx.de \
    --cc=mcoquelin.stm32@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

all inboxes | Powered by JetHome®