From: Stephan Mueller <smueller@chronox.de>
To: herbert@gondor.apana.org.au
Cc: linux-crypto@vger.kernel.org
Subject: Re: module ref count
Date: Tue, 21 Apr 2015 14:56:31 +0200 [thread overview]
Message-ID: <2752017.WuurLylSds@myon.chronox.de> (raw)
In-Reply-To: <1513971.JRWYZvf2T6@myon.chronox.de>
Am Dienstag, 21. April 2015, 14:35:47 schrieb Stephan Mueller:
Hi Stephan,
> Hi Herbert,
>
> I am currently working on the template for SP800-38F key wrapping. The
> module is operational and calculates what I want.
>
> However, I have one problem I am having difficulties to track down and I am
> wondering whether you could point me to the right direction.
>
> When a caller calls
>
> crypto_alloc_aead("kw(aes)", 0, 0);
>
> somehow the refcount of the kernel module implementing the keywrapping is
> not increased. Once can see that in lsmod where the "Used by" value remains
> 0.
>
> Then when the caller deallocates the cipher handle, the refcount is -1
> according to lsmod. With that, a second invocation of crypto_alloc_aead will
> fail and I even cannot remove the module from the kernel.
>
> Who increases the refcount on the kernel crypto API side?
I think I hit an even bigger problem: while playing with other AEAD ciphers, I
see the same thing now:
$ lsmod
Module Size Used by
ansi_cprng 12989 0
drbg 30255 0
algif_rng 12753 0
seqiv 13003 -1
ccm 17731 -1
gcm 23371 -1
Allocation of these ciphers fail.
>
> Thanks a lot
--
Ciao
Stephan
next prev parent reply other threads:[~2015-04-21 12:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-21 12:35 module ref count Stephan Mueller
2015-04-21 12:56 ` Stephan Mueller [this message]
2015-04-21 14:43 ` Stephan Mueller
2015-04-22 7:26 ` 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=2752017.WuurLylSds@myon.chronox.de \
--to=smueller@chronox.de \
--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