All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steffen Klassert <steffen.klassert@secunet.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: David Miller <davem@davemloft.net>, linux-crypto@vger.kernel.org
Subject: Re: [RFC] [PATCH 2/5] aead: Add generic aead wrapper interface
Date: Mon, 8 Jun 2009 08:45:18 +0200	[thread overview]
Message-ID: <20090608064518.GQ20366@secunet.com> (raw)
In-Reply-To: <20090608052808.GB19826@gondor.apana.org.au>

On Mon, Jun 08, 2009 at 03:28:08PM +1000, Herbert Xu wrote:
> On Fri, Jun 05, 2009 at 11:34:30AM +0200, Steffen Klassert wrote:
> >
> > In pcrypt_alloc_instance() I do
> > inst->alg.cra_priority = alg->cra_priority + 100;
> > 
> > So, in my case authenc has priority 2000 and pcrypt has priority 2100.
> > In this case pcrypt is not instantiated if I use %s for pcrypt as
> > cra_name. If I do 
> > inst->alg.cra_priority = alg->cra_priority - 100
> > it will be instantiated with priority 1900 but it will not be used
> > because the priority of authenc is higher.
> > 
> > So I did the priority check in crypto_alg_tested() the other way around.
> > Then I can instantiate pcrypt with priority 2100 and I can use it.
> 
> Can you send me a pcrypt patch that I can use to reproduce this?

Yes, I will send the full patchset including the tcrypt changes to
instantiate pcrypt.

As the patchset is, I'm not able to instantiate pcrypt here. I need to
either change the priority check in crypto_alg_tested() or to make
pcrypt using a lower priority than authenc.

> 
> The check modified is meant to replace instances of the same
> implementation (i.e., you're replaceing aes-x86-64 with a newer
> version of aes-x86-64).  It should never do anything when you add
> a different implementation of the same algorithm.
> 
> So I'm surprised that you're seeing a difference when changing
> that check.  Because unless you're creating two pcrypt objects
> with the same driver name, or your pcrypt object has the wrong
> driver name, then this change should make no difference whatsoever.
> 

I was just surprised that I was able to instantiate pcrypt if it has a
lower priority than the underlying authenc algorithm. So I searched for
priority checks like the one in crypto_alg_tested() and in fact changing
this check got it to work as I described above.

  reply	other threads:[~2009-06-08  6:42 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-13 13:06 [RFC] [PATCH 0/5] Parallel IPsec v3 Steffen Klassert
2009-05-13 13:07 ` [RFC] [PATCH 1/5] padata: generic interface for parallel processing Steffen Klassert
2009-05-13 13:08 ` [RFC] [PATCH 2/5] aead: Add generic aead wrapper interface Steffen Klassert
2009-06-02  3:45   ` Herbert Xu
2009-06-02  3:50   ` Herbert Xu
2009-06-02  9:21     ` Steffen Klassert
2009-06-02  9:28       ` Herbert Xu
2009-06-03  9:32         ` Steffen Klassert
2009-06-03  9:40           ` Herbert Xu
2009-06-03 11:23             ` Steffen Klassert
2009-06-03 11:59               ` Herbert Xu
2009-06-03 12:14                 ` Steffen Klassert
2009-06-03 12:14                   ` Herbert Xu
2009-06-05  9:20                 ` Steffen Klassert
2009-06-05  9:20                   ` Herbert Xu
2009-06-05  9:34                     ` Steffen Klassert
2009-06-08  5:28                       ` Herbert Xu
2009-06-08  6:45                         ` Steffen Klassert [this message]
2009-06-25  6:51                           ` Herbert Xu
2009-06-29 11:04                             ` Steffen Klassert
2009-06-29 11:59                               ` Herbert Xu
2009-06-29 13:52                                 ` Steffen Klassert
2009-06-29 13:55                                   ` [PATCH 1/2] padata: generic interface for parallel processing Steffen Klassert
2009-06-29 13:57                                   ` [PATCH 2/2] pcrypt: Add pcrypt crypto parallelization wrapper Steffen Klassert
2009-08-19  7:15                                   ` [RFC] [PATCH 2/5] aead: Add generic aead wrapper interface Steffen Klassert
2009-08-31  5:58                                     ` Herbert Xu
2009-08-31  8:45                                       ` Steffen Klassert
2009-05-13 13:08 ` [RFC] [PATCH 3/5] pcrypt: Add pcrypt crypto parallelization wrapper Steffen Klassert
2009-05-13 13:09 ` [RFC] [PATCH 4/5] eseqiv: Add support for aead algorithms Steffen Klassert
2009-05-13 13:10 ` [RFC] [PATCH 5/5] authenc: Add support for the pcrypt aead wrapper Steffen Klassert

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=20090608064518.GQ20366@secunet.com \
    --to=steffen.klassert@secunet.com \
    --cc=davem@davemloft.net \
    --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 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.