linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ardb@kernel.org>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org,
	Linux Crypto Mailing List <linux-crypto@vger.kernel.org>,
	Antoine Tenart <antoine.tenart@bootlin.com>,
	Andrew Lunn <andrew@lunn.ch>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	Jakub Kicinski <kuba@kernel.org>,
	Eric Biggers <ebiggers@google.com>
Subject: Re: [PATCH v2] net: phy: mscc: avoid skcipher API for single block AES encryption
Date: Thu, 25 Jun 2020 21:32:57 +0200	[thread overview]
Message-ID: <CAMj1kXG5MqCPJ3zG4P0NNzDC9qzwwCSOw09Bgi+SYm_0YFhmFg@mail.gmail.com> (raw)
In-Reply-To: <20200625.121605.1198833456036514480.davem@davemloft.net>

On Thu, 25 Jun 2020 at 21:16, David Miller <davem@davemloft.net> wrote:
>
> From: Ard Biesheuvel <ardb@kernel.org>
> Date: Thu, 25 Jun 2020 09:18:16 +0200
>
> > The skcipher API dynamically instantiates the transformation object
> > on request that implements the requested algorithm optimally on the
> > given platform. This notion of optimality only matters for cases like
> > bulk network or disk encryption, where performance can be a bottleneck,
> > or in cases where the algorithm itself is not known at compile time.
> >
> > In the mscc case, we are dealing with AES encryption of a single
> > block, and so neither concern applies, and we are better off using
> > the AES library interface, which is lightweight and safe for this
> > kind of use.
> >
> > Note that the scatterlist API does not permit references to buffers
> > that are located on the stack, so the existing code is incorrect in
> > any case, but avoiding the skcipher and scatterlist APIs entirely is
> > the most straight-forward approach to fixing this.
> >
> > Fixes: 28c5107aa904e ("net: phy: mscc: macsec support")
> > Reviewed-by: Eric Biggers <ebiggers@google.com>
> > Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
>
> Applied and queued up for -stable, thanks.
>
> Please never CC: stable for networking changes, I handle the submissions
> by hand.
>

Noted, thanks.

      reply	other threads:[~2020-06-25 19:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-25  7:18 [PATCH v2] net: phy: mscc: avoid skcipher API for single block AES encryption Ard Biesheuvel
2020-06-25  7:54 ` Antoine Tenart
2020-06-25 19:16 ` David Miller
2020-06-25 19:32   ` Ard Biesheuvel [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=CAMj1kXG5MqCPJ3zG4P0NNzDC9qzwwCSOw09Bgi+SYm_0YFhmFg@mail.gmail.com \
    --to=ardb@kernel.org \
    --cc=andrew@lunn.ch \
    --cc=antoine.tenart@bootlin.com \
    --cc=davem@davemloft.net \
    --cc=ebiggers@google.com \
    --cc=f.fainelli@gmail.com \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=netdev@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).