From: Ard Biesheuvel <email@example.com> To: Eric Biggers <firstname.lastname@example.org> Cc: email@example.com, firstname.lastname@example.org, email@example.com, firstname.lastname@example.org, email@example.com Subject: Re: [PATCH v5 4/5] crypto: arm64/aes-ccm - remove non-SIMD fallback path Date: Wed, 26 May 2021 11:12:27 +0200 [thread overview] Message-ID: <CAMj1kXF-t6JHU_8qKekSNf8W5yrTc8Xdk8_hFnMRDm3iU7nG5w@mail.gmail.com> (raw) In-Reply-To: <YKwf9wmioRxrKOGO@gmail.com> On Mon, 24 May 2021 at 23:51, Eric Biggers <firstname.lastname@example.org> wrote: > > On Fri, May 21, 2021 at 12:20:52PM +0200, Ard Biesheuvel wrote: > > AES/CCM on arm64 is implemented as a synchronous AEAD, and so it is > > guaranteed by the API that it is only invoked in task or softirq > > context. Since softirqs are now only handled when the SIMD is not > > being used in the task context that was interrupted to service the > > softirq, we no longer need a fallback path. Let's remove it. > > > > Signed-off-by: Ard Biesheuvel <email@example.com> > > --- > > arch/arm64/crypto/aes-ce-ccm-core.S | 1 + > > arch/arm64/crypto/aes-ce-ccm-glue.c | 181 ++++++-------------- > > 2 files changed, 53 insertions(+), 129 deletions(-) > > This doesn't just remove the no-SIMD fallback, but it also does some > refactoring. Notably, it starts to process all the authenticated data in one > kernel_neon_begin() / kernel_neon_end() pair rather than many. Can you explain > why that is okay now when previously it wasn't, and also split this into two > separate commits? > OK. For the record, the reason is that, even though kernel_neon_begin/end are reasonably cheap these days, the common case for CCM (given its use in networking context) is for the auth/encrypt/finalize routines to each be called a single time, without any potentially sleeping calls into the skcipher walk layer in between. Now that we are doing more work in there (disable softirq processing as well as preemption), it was a suitable occasion to do some refactoring that I have had on my list for a while now. _______________________________________________ linux-arm-kernel mailing list firstname.lastname@example.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2021-05-26 11:06 UTC|newest] Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-05-21 10:20 [PATCH v5 0/5] running kernel mode SIMD with softirqs disabled Ard Biesheuvel 2021-05-21 10:20 ` [PATCH v5 1/5] crypto: arm64/gcm-aes-ce - remove non-SIMD fallback path Ard Biesheuvel 2021-05-24 21:46 ` Eric Biggers 2021-05-21 10:20 ` [PATCH v5 2/5] crypto: arm64/aes-neonbs - stop using SIMD helper for skciphers Ard Biesheuvel 2021-05-24 21:46 ` Eric Biggers 2021-05-21 10:20 ` [PATCH v5 3/5] crypto: arm64/aes-ce " Ard Biesheuvel 2021-05-24 21:47 ` Eric Biggers 2021-05-21 10:20 ` [PATCH v5 4/5] crypto: arm64/aes-ccm - remove non-SIMD fallback path Ard Biesheuvel 2021-05-24 21:51 ` Eric Biggers 2021-05-26 9:12 ` Ard Biesheuvel [this message] 2021-05-21 10:20 ` [PATCH v5 5/5] crypto: arm64/aes-ccm - avoid by-ref argument for ce_aes_ccm_auth_data Ard Biesheuvel 2021-05-24 21:53 ` Eric Biggers 2021-05-26 9:14 ` Ard Biesheuvel
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=CAMj1kXF-t6JHU_8qKekSNf8W5yrTc8Xdk8_hFnMRDm3iU7nG5w@mail.gmail.com \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --subject='Re: [PATCH v5 4/5] crypto: arm64/aes-ccm - remove non-SIMD fallback path' \ /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
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).