Linux cryptographic layer development
 help / color / mirror / Atom feed
From: Kent Borg <kentborg@borg.org>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: linux-crypto@vger.kernel.org
Subject: Re: HW Accelerated IPSEC?
Date: Fri, 10 Jun 2011 10:38:18 -0400	[thread overview]
Message-ID: <4DF22C5A.2000907@borg.org> (raw)
In-Reply-To: <20110610005951.GA27419@gondor.apana.org.au>

Herbert Xu wrote:
 > Since your IPsec is actually breaking, then mv_cesa is probably 
getting used.

Yes, that makes sense.

 > Did you compile in the self-test suite (unset
 > CONFIG_CRYPTO_MANAGER_DISABLE_TESTS)?

I have it unset, and /proc/crypto is reporting all tests as passed for 
mv_cesa. (My driver, which also doesn't work with IPSec, also passes all 
the tests.)

> It sounds like a bug in mv_cesa.
>   

(Assuming I am not breaking it some how in my usage.) And a 
corresponding bug in my driver. I looked at mv_cesa and other drivers, I 
might have copied an mv_cesa bug.

I made module versions of aes_generic, sha1_generic, and sha256_generic, 
and boosted the priorities a bit. When I run IPSec through them, I see 
the use counts for my munged versions go up, and it works. So I guess I 
have shown that a module can do crypto for IPSec. Just not mv_cesa nor 
my module.

Looking at packet dumps in both the good and bad IPSec cases, it seems 
the key negotiation is working, but when a payload packet is expected 
(the first packet that I think will use the crypto module), I never see 
it in the mv_cesa case.

I was hoping that passing the self-test meant my code worked. I also 
used an encrypted lookback filesystem with both mv_cesa and my module, 
and, after I fixed my "last bug", both can handle that.

Maybe both modules are processing the data-in/data-out aspect correctly, 
but are misbehaving in some other way; a missing lock on a critical 
section, for example. For some reason IPSec gets unhappy where self-test 
and loopback are quite content. Or, maybe IPSec has a bug that is 
somehow exposed when a different HW unit gets into the act. (Which is 
why I was looking for any confirmed case of IPSec going through the 
kernel's crypto infrastructure for HW acceleration.)


Thanks,

-kb, the Kent who is looking for a way to simplify the problem.

  reply	other threads:[~2011-06-10 14:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-07 16:44 HW Accelerated IPSEC? Kent Borg
2011-06-09 18:53 ` Kent Borg
2011-06-10  0:59   ` Herbert Xu
2011-06-10 14:38     ` Kent Borg [this message]
2011-06-11  1:18       ` Herbert Xu
2011-06-14 20:51         ` Kent Borg
2011-06-14 20:56           ` Herbert Xu

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=4DF22C5A.2000907@borg.org \
    --to=kentborg@borg.org \
    --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