Linux wireless drivers development
 help / color / mirror / Atom feed
From: "Malinen, Jouni" <jouni@qca.qualcomm.com>
To: "ard.biesheuvel@linaro.org" <ard.biesheuvel@linaro.org>
Cc: "johannes@sipsolutions.net" <johannes@sipsolutions.net>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [RFC PATCH 0/2] mac80211: use crypto shash for AES cmac
Date: Sat, 4 Feb 2017 14:39:16 +0000	[thread overview]
Message-ID: <20170204143913.GA24691@jouni.qca.qualcomm.com> (raw)
In-Reply-To: <CAKv+Gu9p_yng=_=sri8VtRpBCpvL-r1iZ=YgEqNhuQf55p1xBA@mail.gmail.com>

On Sat, Feb 04, 2017 at 02:24:36PM +0000, Ard Biesheuvel wrote:
> There is another issue I spotted: the skcipher you allocate may be of
> the async variant, which may return from skcipher_encrypt() with
> -EINPROGRESS as soon as it has queued the request. Since you don't
> deal with that result, you should allocate a sync cipher explicitly:

> diff --git a/net/mac80211/fils_aead.c b/net/mac80211/fils_aead.c
> -       tfm2 =3D crypto_alloc_skcipher("ctr(aes)", 0, 0);
> +       tfm2 =3D crypto_alloc_skcipher("ctr(aes)", 0, CRYPTO_ALG_ASYNC);

> -       tfm2 =3D crypto_alloc_skcipher("ctr(aes)", 0, 0);
> +       tfm2 =3D crypto_alloc_skcipher("ctr(aes)", 0, CRYPTO_ALG_ASYNC);

Thanks! Can you send this as a full contribution or do you want me to
do that? I did run this through all the FILS test cases with
mac80211_hwsim.

> Thanks for the instructions and thanks for testing. If I manage to run
> this locally, I will follow up with an alternative patch #1 that
> switches FILS to use cmac(aes) as well (which looks reasonably
> feasible now that I understand the code)

If you have any issues in getting the hwsim test setup working, please
let me know. I'm trying to make it easy for anyone to run those tests in
hopes of improving quality of Linux WLAN contributions and what gets
applied into cfg80211 or mac80211 (or hostap.git for that matter). In
particular the latest step-by-step guide I added for the VM version (*)
was hoping to show how that can be done in 15 minutes from scratch..


(*) http://w1.fi/cgit/hostap/plain/tests/hwsim/vm/example-vm-setup.txt

--=20
Jouni Malinen                                            PGP id EFC895FA=

  reply	other threads:[~2017-02-04 14:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-03 19:25 [RFC PATCH 0/2] mac80211: use crypto shash for AES cmac Ard Biesheuvel
2017-02-03 19:25 ` [RFC PATCH 1/2] mac80211: fils_aead: clone shared CMAC functions into private version Ard Biesheuvel
2017-02-03 19:25 ` [RFC PATCH 2/2] mac80211: aes-cmac: switch to shash CMAC driver Ard Biesheuvel
2017-02-03 21:47 ` [RFC PATCH 0/2] mac80211: use crypto shash for AES cmac Malinen, Jouni
2017-02-03 21:55   ` Ard Biesheuvel
2017-02-04 11:35     ` Malinen, Jouni
2017-02-04 14:24       ` Ard Biesheuvel
2017-02-04 14:39         ` Malinen, Jouni [this message]
2017-02-04 14:44           ` 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=20170204143913.GA24691@jouni.qca.qualcomm.com \
    --to=jouni@qca.qualcomm.com \
    --cc=ard.biesheuvel@linaro.org \
    --cc=davem@davemloft.net \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@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