All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless@vger.kernel.org, linux-crypto@vger.kernel.org,
	Johannes Berg <johannes.berg@intel.com>
Subject: Re: [PATCH 1/2] wifi: mac80211: use aesgcm library
Date: Tue, 5 May 2026 15:16:53 -0700	[thread overview]
Message-ID: <20260505221653.GA10301@quark> (raw)
In-Reply-To: <20260505211841.669767-3-johannes@sipsolutions.net>

Hi Johannes,

On Tue, May 05, 2026 at 11:18:38PM +0200, Johannes Berg wrote:
> From: Johannes Berg <johannes.berg@intel.com>
> 
> Instead of dynamically allocating the gcm(aes) algorithm, use
> the library. This is faster and avoids the extra allocation.
> 
> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
> ---
>  net/mac80211/Kconfig   |  2 +-
>  net/mac80211/aes_gcm.h | 39 +++++++++++++++++----------------------
>  net/mac80211/key.c     | 11 +++--------
>  net/mac80211/key.h     |  3 ++-
>  net/mac80211/wpa.c     |  9 +++++----
>  5 files changed, 28 insertions(+), 36 deletions(-)

I really appreciate the enthusiasm for the crypto library!  And it isn't
surprising, since it's clearly the way to go.  But I do think these two
patches are jumping the gun a bit, since we haven't yet migrated all the
optimized AES-GCM code into the library, or added an improved AES-GCM
API that provides enough functionality to fulfill all the in-kernel use
cases (for example, incremental computation of AES-GMAC).

So as-is these two patches could regress performance in some cases
(despite the library having less overhead).  And also the AES-GCM API is
likely to change a bit.  In particular I don't think code outside the
crypto subsystem should be constructing its own AES-GMAC by combining
the GHASH functions with the AES functions, as your second patch does.
Instead they should invoke an AES-GMAC API (or AES-GCM, of which
AES-GMAC is a special case) provided by lib/crypto/.

So I'd ask that we wait just a bit until I can finish getting the
AES-GCM library APIs into a good state.  I got a lot of the prerequisite
work in for 7.0 and 7.1, and I'll see if I can finish it in 7.2.  I've
just been a bit busy with other things in the past few weeks.

Thanks,

- Eric

  parent reply	other threads:[~2026-05-05 22:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-05 21:18 [PATCH 1/2] wifi: mac80211: use aesgcm library Johannes Berg
2026-05-05 21:18 ` [PATCH 2/2] wifi: mac80211: use gf128hash library Johannes Berg
2026-05-05 22:16 ` Eric Biggers [this message]
2026-05-06  7:06   ` [PATCH 1/2] wifi: mac80211: use aesgcm library Johannes Berg
2026-07-07  5:47     ` Eric Biggers

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=20260505221653.GA10301@quark \
    --to=ebiggers@kernel.org \
    --cc=johannes.berg@intel.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-wireless@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.