linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ardb@kernel.org>
To: Ben Greear <greearb@candelatech.com>
Cc: Eric Biggers <ebiggers@kernel.org>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	 Linux Crypto Mailing List <linux-crypto@vger.kernel.org>
Subject: Re: [PATCH v2] crypto: aesni - add ccm(aes) algorithm implementation
Date: Wed, 28 Aug 2024 18:04:11 +0200	[thread overview]
Message-ID: <CAMj1kXFP3fT0TaxfukRegRE+5XqQ+i+CCLmK5ComgGkpS6ANbA@mail.gmail.com> (raw)
In-Reply-To: <ec3270e2-52d7-434b-8e05-d6a4df5f0af8@candelatech.com>

On Sat, 3 Aug 2024 at 19:20, Ben Greear <greearb@candelatech.com> wrote:
>
> On 10/16/23 23:43, Ard Biesheuvel wrote:
> > On Tue, 17 Oct 2023 at 05:16, Eric Biggers <ebiggers@kernel.org> wrote:
> >>
> >> On Mon, Oct 16, 2023 at 01:50:05PM -0700, Ben Greear wrote:
> >>> On 11/12/22 06:59, Ard Biesheuvel wrote:
> >>>> On Fri, 11 Nov 2022 at 23:29, Ben Greear <greearb@candelatech.com> wrote:
> >>>>>
> >>>>> On 11/9/22 2:05 AM, Ard Biesheuvel wrote:
> >>>>>> On Wed, 9 Nov 2022 at 04:52, Herbert Xu <herbert@gondor.apana.org.au> wrote:
> >>>>>>>
> >>>>>>> On Tue, Nov 08, 2022 at 10:50:48AM -0800, Ben Greear wrote:
> >>>>>>>>
> >>>>>>>> While rebasing my patches onto 6.1-rc4, I noticed my aesni for ccm(aes) patch didn't apply cleanly,
> >>>>>>>> and I found this patch described below is applied now.  Does this upstream patch mean that aesni is already
> >>>>>>>> supported upstream now?  Or is it specific to whatever xctr is?  If so,
> >>>>>>>> any chance the patch is wanted upstream now?
> >>>>>>>
> >>>>>>> AFAICS the xctr patch has nothing to do with what you were trying
> >>>>>>> to achieve with wireless.  My objection still stands with regards
> >>>>>>> to wireless, we should patch wireless to use the async crypto
> >>>>>>> interface and not hack around it in the Crypto API.
> >>>>>>>
> >>>>>>
> >>>>>> Indeed. Those are just add/add conflicts because both patches
> >>>>>> introduce new code into the same set of files. The resolution is
> >>>>>> generally to keep both sides.
> >>>>>>
> >>>>>> As for Herbert's objection: I will note here that in the meantime,
> >>>>>> arm64 now has gotten rid of the scalar fallbacks entirely in AEAD and
> >>>>>> skipcher implementations, because those are only callable in task or
> >>>>>> softirq context, and the arm64 SIMD wrappers now disable softirq
> >>>>>> processing. This means that the condition that results in the fallback
> >>>>>> being needed can no longer occur, making the SIMD helper dead code on
> >>>>>> arm64.
> >>>>>>
> >>>>>> I suppose we might do the same thing on x86, but since the kernel mode
> >>>>>> SIMD handling is highly arch specific, you'd really need to raise this
> >>>>>> with the x86 maintainers.
> >>>>>>
> >>>>>
> >>>>> Hello Ard,
> >>>>>
> >>>>> Could you please review the attached patch to make sure I merged it properly?  My concern
> >>>>> is the cleanup section and/or some problems I might have introduced related to the similarly
> >>>>> named code that was added upstream.
> >>>>>
> >>>>
> >>>> I don't think the logic is quite right, although it rarely matter.
> >>>>
> >>>> I've pushed my version here - it invokes the static call for CTR so it
> >>>> will use the faster AVX version if the CPU supports it.
> >>>>
> >>>> https://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git/log/?h=aesni-ccm-v6.1
> >>>
> >>> Hello Ard,
> >>>
> >>> It looks like something changed again in the intel-aesni logic for 6.6 kernel.  I was able to do a small
> >>> change to the patch to get it to compile, but the kernel crashes when I bring up a wlan port in
> >>> 6.6.  When I remove the aesni patch, the station comes up without crashing.  The aesni patch worked
> >>> fine in 6.5 as far as I can tell.
> >>>
> >>> I'm attaching my slightly modified version of the patch you sent previous.  If you have time to
> >>> investigate this it would be much appreciated.
> >>>
> >>> Thanks,
> >>> Ben
> >>
> >> If this patch is useful, shouldn't it be upstreamed?
> >>
> >
> > It was rejected by Herbert on the basis that the wireless stack should
> > be converted to use the async API instead.
>
> Hello,
>
> I'm still dragging this patch along (see attached).  I notice that there was a big re-write of
> the aesni logic in 6.11.  Anyone know if this patch would need to be (or should be)
> modified to work well with the new upstream code?
>

Those changes should be mostly orthogonal, so beyond resolving lexical
conflicts, I wouldn't expect any additional work to be needed to
forward port this.

  reply	other threads:[~2024-08-28 16:04 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-01 19:45 [PATCH v2] crypto: aesni - add ccm(aes) algorithm implementation Ard Biesheuvel
2020-12-01 21:40 ` Ben Greear
2020-12-01 21:57 ` Herbert Xu
2020-12-01 22:00   ` Ben Greear
2020-12-01 22:01     ` Herbert Xu
2020-12-01 22:01   ` Ard Biesheuvel
2020-12-01 22:04     ` Herbert Xu
2020-12-01 22:12       ` Ard Biesheuvel
2020-12-01 22:16         ` Herbert Xu
2020-12-01 22:27           ` Ard Biesheuvel
2020-12-01 23:11             ` Herbert Xu
2020-12-01 23:24               ` Ard Biesheuvel
2020-12-01 23:30                 ` Herbert Xu
2020-12-01 23:41                   ` Ard Biesheuvel
2020-12-01 23:48                     ` Herbert Xu
2020-12-02  0:01                       ` Ben Greear
2020-12-10  0:18               ` Ard Biesheuvel
2020-12-10  2:43                 ` Herbert Xu
2020-12-10  3:01                   ` Ben Greear
2020-12-10  7:30                     ` Ard Biesheuvel
2020-12-10 11:14                       ` Herbert Xu
2020-12-10 12:03                         ` Ard Biesheuvel
2020-12-10 12:16                           ` Herbert Xu
2020-12-10 12:19                             ` Ard Biesheuvel
2020-12-15  8:55                               ` Ard Biesheuvel
2020-12-15  9:19                                 ` Herbert Xu
2022-11-08 18:50                                   ` Ben Greear
2022-11-09  3:52                                     ` Herbert Xu
2022-11-09 10:05                                       ` Ard Biesheuvel
2022-11-09 14:12                                         ` Ben Greear
2022-11-11 22:29                                         ` Ben Greear
2022-11-12 14:59                                           ` Ard Biesheuvel
2023-10-16 20:50                                             ` Ben Greear
2023-10-17  3:16                                               ` Eric Biggers
2023-10-17  6:43                                                 ` Ard Biesheuvel
2023-10-18  1:24                                                   ` Herbert Xu
2024-08-03 17:20                                                   ` Ben Greear
2024-08-28 16:04                                                     ` Ard Biesheuvel [this message]
2020-12-10 14:40                       ` Ben Greear
2020-12-01 22:12       ` Ben Greear

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=CAMj1kXFP3fT0TaxfukRegRE+5XqQ+i+CCLmK5ComgGkpS6ANbA@mail.gmail.com \
    --to=ardb@kernel.org \
    --cc=ebiggers@kernel.org \
    --cc=greearb@candelatech.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).