public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Larry Finger <Larry.Finger@lwfinger.net>
To: LKML <linux-kernel@vger.kernel.org>,
	Herbert Xu <herbert@gondor.hengli.com.au>
Cc: driverdevel <devel@driverdev.osuosl.org>,
	wireless <linux-wireless@vger.kernel.org>,
	Jan Simonson <jan@simonson.se>
Subject: Problem with crypto when initializing TKIP
Date: Mon, 16 Apr 2012 00:29:19 -0500	[thread overview]
Message-ID: <4F8BAE2F.5090200@lwfinger.net> (raw)

I am trying to fix the driver r8192e_pci from the staging tree. It works fine 
with WEP and CCMP encryption, but it fails when trying to initialize TKIP. This 
driver does not use mac80211, but incorporates its own softmac routines.

This problem is a regression between 3.2.0 and 3.3.0, but I was unable to get a 
reasonable result using bisection.

Routine rtllib_tkip_init() from drivers/staging/rtl8192e/rtllib_crypt_tkip.c 
does the same set of steps as is done in mac80211. Everything works with mac80211.

The block cipher allocation calls to crypto_alloc_blkcipher("ecb(arc4)",...) are 
OK. The crypto_alloc_hash("michael_mic",...) call is the part that fails. The 
problem shows up in the code fragment below from crypto/api.c:

         ok = crypto_probing_notify(CRYPTO_MSG_ALG_REQUEST, larval);

         if (ok == NOTIFY_STOP)
                 alg = crypto_larval_wait(larval);
         else {
                 crypto_mod_put(larval);
                 alg = ERR_PTR(-ENOENT);
         }

The value of ok is NOTIFY_OK, which leads to a return of -ENOENT and a failure 
of the initialization.

I know this code is pretty old, and perhaps nobody remembers it, but I would 
appreciate some pointers on debugging this issue.

Thanks,

Larry

             reply	other threads:[~2012-04-16  5:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-16  5:29 Larry Finger [this message]
2012-04-16 12:48 ` Problem with crypto when initializing TKIP Herbert Xu
2012-04-16 15:51   ` Larry Finger

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=4F8BAE2F.5090200@lwfinger.net \
    --to=larry.finger@lwfinger.net \
    --cc=devel@driverdev.osuosl.org \
    --cc=herbert@gondor.hengli.com.au \
    --cc=jan@simonson.se \
    --cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox